Skip to content

Commit 397b5e5

Browse files
authored
Merge pull request #233 from jaypume/docs
fix docs: index and quickstart
2 parents f3e0c17 + 8683997 commit 397b5e5

File tree

13 files changed

+421
-529
lines changed

13 files changed

+421
-529
lines changed

docs/api/lib/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
===========================================
2-
Sedna Python SDK
2+
Python API Use Guide
33
===========================================
44

55
.. mdinclude:: ../../../lib/sedna/README.md

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# -- Project information -----------------------------------------------------
5959

6060
project = 'Sedna'
61-
copyright = '2020, Kubeedge'
61+
copyright = '2021, Kubeedge'
6262
author = 'Kubeedge'
6363

6464
version = __version__

docs/index.rst

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,24 @@ Sedna is an edge-cloud synergy AI project incubated in KubeEdge SIG AI. Benefiti
99

1010
Sedna can simply enable edge-cloud synergy capabilities to existing training and inference scripts, bringing the benefits of reducing costs, improving model performance, and protecting data privacy.
1111

12+
1213
.. toctree::
1314
:maxdepth: 1
14-
:caption: QUICK START
15+
:caption: GUIDE
1516

16-
quickstart
17+
index/guide
18+
index/quickstart
19+
20+
21+
.. toctree::
22+
:maxdepth: 1
23+
:titlesonly:
24+
:glob:
25+
:caption: DEPLOY
26+
27+
Cluster Installation (for production) <setup/install>
28+
AllinOne Installation (for development) <setup/all-in-one>
29+
Standalone Installation (for hello world) <setup/local-up>
1730

1831

1932
.. toctree::
@@ -31,34 +44,28 @@ Sedna can simply enable edge-cloud synergy capabilities to existing training and
3144
proposals/object-tracking
3245

3346

34-
.. toctree::
35-
:maxdepth: 1
36-
:titlesonly:
37-
:glob:
38-
:caption: DEPLOY
39-
40-
Installtion <setup/install>
41-
Standalone <setup/local-up>
42-
4347
.. toctree::
4448
:maxdepth: 1
4549
:glob:
4650
:caption: EXAMPLES
4751

48-
examples/federated_learning/surface_defect_detection/README
49-
examples/incremental_learning/helmet_detection/README
5052
examples/joint_inference/helmet_detection_inference/README
53+
examples/incremental_learning/helmet_detection/README
54+
examples/federated_learning/surface_defect_detection/README
55+
examples/federated_learning/yolov5_coco128_mistnet/README
5156
examples/lifelong_learning/atcii/README
5257
examples/storage/s3/*
5358

5459

5560
.. toctree::
5661
:maxdepth: 1
57-
:caption: API
62+
:caption: API REFERENCE
5863
:titlesonly:
5964
:glob:
6065

6166
api/lib/*
67+
Python API <autoapi/lib/sedna/index>
68+
6269

6370
.. toctree::
6471
:maxdepth: 1
@@ -69,26 +76,17 @@ Sedna can simply enable edge-cloud synergy capabilities to existing training and
6976
Control Plane <contributing/prepare-environment>
7077

7178

72-
.. toctree::
73-
:maxdepth: 1
74-
:caption: API REFERENCE
75-
:titlesonly:
76-
:glob:
77-
78-
autoapi/lib/sedna/index
79-
80-
8179
.. toctree::
8280
:caption: ROADMAP
8381
:hidden:
8482

85-
roadmap
83+
index/roadmap
8684

8785

8886
RELATED LINKS
8987
=============
9088

91-
.. mdinclude:: related_link.md
89+
.. mdinclude:: index/related_link.md
9290

9391
Indices and tables
9492
==================

docs/index/guide.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Guide
2+
- If you are new to Sedna, you can try the command step by step in [quick start](./quickstart.md).
3+
- If you have played the above example, you can find more [examples](/examples/README.md).
4+
- If you want to know more about sedna's architecture and component, you can find them in [sedna home].
5+
- If you're looking to contribute documentation improvements, you'll specifically want to see the [kubernetes documentation style guide] before [filing an issue][file-an-issue].
6+
- If you're planning to contribute code changes, you'll want to read the [development preparation guide] next.
7+
- If you're planning to add a new synergy feature directly, you'll want to read the [guide][add-feature-guide] next.
8+
9+
10+
[proposals]: /docs/proposals
11+
[development preparation guide]: ../contributing/prepare-environment.md
12+
[add-feature-guide]: ../contributing/control-plane/add-a-new-synergy-feature.md
13+
14+
[sedna home]: https://github.com/kubeedge/sedna
15+
[issues]: https://github.com/kubeedge/sedna/issues
16+
[file-an-issue]: https://github.com/kubeedge/sedna/issues/new/choose
17+
[file-a-fr]: https://github.com/kubeedge/sedna/issues/new?labels=kind%2Ffeature&template=enhancement.md
18+
19+
[github]: https://github.com/
20+
[kubernetes documentation style guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/style-guide.md
21+
[recommended Git workflow]: https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md#workflow
22+
[pull request best practices]: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
23+
[Kubernetes help wanted]: https://www.kubernetes.dev/docs/guide/help-wanted/
24+
File renamed without changes.

docs/index/quickstart.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
2+
# Quick Start
3+
4+
5+
The following is showing how to run a joint inference job by sedna.
6+
## Quick Start
7+
8+
#### 0. Check the Environment
9+
10+
For Sedna all-in-one installation, it requires you:
11+
- 1 VM **(one machine is OK, cluster is not required)**
12+
- 2 CPUs or more
13+
- 2GB+ free memory, depends on node number setting
14+
- 10GB+ free disk space
15+
- Internet connection(docker hub, github etc.)
16+
- Linux platform, such as ubuntu/centos
17+
- Docker 17.06+
18+
19+
you can check the docker version by the following command,
20+
```bash
21+
docker -v
22+
```
23+
after doing that, the output will be like this, that means your version fits the bill.
24+
```
25+
Docker version 19.03.6, build 369ce74a3c
26+
```
27+
28+
29+
#### 1. Deploy Sedna
30+
Sedna provides three deployment methods, which can be selected according to your actual situation:
31+
32+
- [Install Sedna AllinOne](setup/all-in-one.md). (used for development, here we use it)
33+
- [Install Sedna local up](setup/local-up.md).
34+
- [Install Sedna on a cluster](setup/install.md).
35+
36+
The [all-in-one script](/scripts/installation/all-in-one.sh) is used to install Sedna along with a mini Kubernetes environment locally, including:
37+
- A Kubernetes v1.21 cluster with multi worker nodes, default zero worker node.
38+
- KubeEdge with multi edge nodes, default is latest KubeEdge and one edge node.
39+
- Sedna, default is the latest version.
40+
41+
```bash
42+
curl https://raw.githubusercontent.com/kubeedge/sedna/master/scripts/installation/all-in-one.sh | NUM_EDGE_NODES=1 bash -
43+
```
44+
45+
Then you get two nodes `sedna-mini-control-plane` and `sedna-mini-edge0`,you can get into each node by following command:
46+
47+
```bash
48+
# get into cloud node
49+
docker exec -it sedna-mini-control-plane bash
50+
```
51+
52+
```bash
53+
# get into edge node
54+
docker exec -it sedna-mini-edge0 bash
55+
```
56+
57+
#### 1. Prepare Data and Model File
58+
59+
* step1: download [little model](https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/little-model.tar.gz) to your edge node.
60+
61+
```
62+
mkdir -p /data/little-model
63+
cd /data/little-model
64+
wget https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/little-model.tar.gz
65+
tar -zxvf little-model.tar.gz
66+
```
67+
68+
* step2: download [big model](https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/big-model.tar.gz) to your cloud node.
69+
70+
```
71+
mkdir -p /data/big-model
72+
cd /data/big-model
73+
wget https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/big-model.tar.gz
74+
tar -zxvf big-model.tar.gz
75+
```
76+
77+
#### 2. Create Big Model Resource Object for Cloud
78+
In cloud node:
79+
```
80+
kubectl create -f - <<EOF
81+
apiVersion: sedna.io/v1alpha1
82+
kind: Model
83+
metadata:
84+
name: helmet-detection-inference-big-model
85+
namespace: default
86+
spec:
87+
url: "/data/big-model/yolov3_darknet.pb"
88+
format: "pb"
89+
EOF
90+
```
91+
92+
#### 3. Create Little Model Resource Object for Edge
93+
In cloud node:
94+
```
95+
kubectl create -f - <<EOF
96+
apiVersion: sedna.io/v1alpha1
97+
kind: Model
98+
metadata:
99+
name: helmet-detection-inference-little-model
100+
namespace: default
101+
spec:
102+
url: "/data/little-model/yolov3_resnet18.pb"
103+
format: "pb"
104+
EOF
105+
```
106+
107+
#### 4. Create JointInferenceService
108+
109+
Note the setting of the following parameters, which have to same as the script [little_model.py](/examples/joint_inference/helmet_detection_inference/little_model/little_model.py):
110+
- hardExampleMining: set hard example algorithm from {IBT, CrossEntropy} for inferring in edge side.
111+
- video_url: set the url for video streaming.
112+
- all_examples_inference_output: set your output path for the inference results.
113+
- hard_example_edge_inference_output: set your output path for results of inferring hard examples in edge side.
114+
- hard_example_cloud_inference_output: set your output path for results of inferring hard examples in cloud side.
115+
116+
Make preparation in edge node
117+
```
118+
mkdir -p /joint_inference/output
119+
```
120+
121+
Create joint inference service
122+
```
123+
CLOUD_NODE="sedna-mini-control-plane"
124+
EDGE_NODE="sedna-mini-edge0"
125+
126+
kubectl create -f https://raw.githubusercontent.com/jaypume/sedna/main/examples/joint_inference/helmet_detection_inference/helmet_detection_inference.yaml
127+
```
128+
129+
130+
#### 5. Check Joint Inference Status
131+
132+
```
133+
kubectl get jointinferenceservices.sedna.io
134+
```
135+
136+
#### 6. Mock Video Stream for Inference in Edge Side
137+
138+
* step1: install the open source video streaming server [EasyDarwin](https://github.com/EasyDarwin/EasyDarwin/tree/dev).
139+
* step2: start EasyDarwin server.
140+
* step3: download [video](https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/video.tar.gz).
141+
* step4: push a video stream to the url (e.g., `rtsp://localhost/video`) that the inference service can connect.
142+
143+
```
144+
wget https://github.com/EasyDarwin/EasyDarwin/releases/download/v8.1.0/EasyDarwin-linux-8.1.0-1901141151.tar.gz
145+
tar -zxvf EasyDarwin-linux-8.1.0-1901141151.tar.gz
146+
cd EasyDarwin-linux-8.1.0-1901141151
147+
./start.sh
148+
149+
mkdir -p /data/video
150+
cd /data/video
151+
wget https://kubeedge.obs.cn-north-1.myhuaweicloud.com/examples/helmet-detection-inference/video.tar.gz
152+
tar -zxvf video.tar.gz
153+
154+
ffmpeg -re -i /data/video/video.mp4 -vcodec libx264 -f rtsp rtsp://localhost/video
155+
```
156+
157+
### Check Inference Result
158+
159+
You can check the inference results in the output path (e.g. `/joint_inference/output`) defined in the JointInferenceService config.
160+
* the result of edge inference vs the result of joint inference
161+
![](../../ /images/inference-result.png)
162+
![](../../examples/joint_inference/helmet_detection_inference/images/inference-result.png)
163+
164+
## API
165+
166+
- control-plane: Please refer to this [link](api/crd).
167+
- Lib: Please refer to this [link](api/lib).
168+
169+
## Contributing
170+
171+
Contributions are very welcome!
172+
173+
- control-plane: Please refer to this [link](contributing/control-plane/development.md).
174+
- Lib: Please refer to this [link](contributing/lib/development.md).
175+
176+
## Community
177+
178+
Sedna is an open source project and in the spirit of openness and freedom, we welcome new contributors to join us.
179+
You can get in touch with the community according to the ways:
180+
* [Github Issues](https://github.com/kubeedge/sedna/issues)
181+
* [Regular Community Meeting](https://zoom.us/j/4167237304)
182+
* [slack channel](https://app.slack.com/client/TDZ5TGXQW/C01EG84REVB/details)
183+

docs/index/related_link.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
### Release
3+
[Sedna0.4.0发布,支持表征提取联邦学习,减少边侧资源需求](https://mp.weixin.qq.com/s/_m5q0t0yYY7gnfQUAssjFg)
4+
[支持边云协同终身学习特性,KubeEdge子项目Sedna 0.3.0版本发布!](https://mp.weixin.qq.com/s/kSFL_pf2BTyVvH5c9zv0Jg)
5+
[体验边云协同AI框架!KubeEdge子项目Sedna 0.1版本发布](https://mp.weixin.qq.com/s/3Ei8ynSAxnfuoIWYdb7Gpg)
6+
[加速AI边云协同创新!KubeEdge社区建立Sedna子项目](https://mp.weixin.qq.com/s/FX2DOsctS_Z7CKHndFByRw)
7+
[边缘智能还能怎么玩?KubeEdge AI SIG 带你飞](https://mp.weixin.qq.com/s/t10_ZrZW42AZoYnisVAbpg)
8+
9+
10+
### Meetup and Conference
11+
[【HDC.Cloud 2021】边云协同,打通AI最后一公里](https://xie.infoq.cn/article/b22e72afe8de50ca34269bb21)
12+
[KubeEdge Sedna如何实现边缘AI模型精度提升50%](https://www.huaweicloud.com/zhishi/hdc2021-Track-24-18.html)

docs/roadmap.md renamed to docs/index/roadmap.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,12 @@ This document defines a high level roadmap for sedna development.
44

55
The [milestones defined in GitHub](https://github.com/kubeedge/sedna/milestones) represent the most up-to-date plans.
66

7+
## 2022 Roadmap
78

8-
## 2021 Q1 Roadmap
9-
10-
- Support edge model and dataset management.
11-
- Support incremental learning, with time trigger, sample size trigger, and precision-based trigger, and integrating hard sample discovering algorithm.
12-
- Support collaborative training, integrating some common weight/gradient compression algorithm.
13-
14-
15-
## Future
16-
17-
- Integrate some common multi-task migration algorithms to resolve the problem of low precision caused by small size samples.
9+
- Integrate some common multi-task migration algorithms to resolve the problem of low precision caused by small size
10+
samples.
1811
- Integrate KubeFlow and ONNX into Sedna, to enable interoperability of edge models with diverse formats.
19-
- Integrate typical AI frameworks into Sedna, include Tensorflow, Pytorch, PaddlePaddle and Mindspore etc.
12+
- Integrate typical AI frameworks into Sedna, include Tensorflow, Pytorch, PaddlePaddle and Mindspore etc.
13+
- Support edge model and dataset management.
2014

2115

0 commit comments

Comments
 (0)