|
| 1 | +# Quick Start |
| 2 | + |
| 3 | +Welcome to Ianvs! Ianvs aims to test the performance of distributed synergy AI solutions following recognized standards, |
| 4 | +in order to facilitate more efficient and effective development. Quick start helps you to test your algorithm on Ianvs |
| 5 | +with a simple example of industrial defect detection. You can reduce manual procedures to just a few steps so that you can |
| 6 | +build and start your distributed synergy AI solution development within minutes. |
| 7 | + |
| 8 | +Before using Ianvs, you might want to have the device ready: |
| 9 | +- One machine is all you need, i.e., a laptop or a virtual machine is sufficient and a cluster is not necessary |
| 10 | +- 2 CPUs or more |
| 11 | +- 4GB+ free memory, depends on algorithm and simulation setting |
| 12 | +- 10GB+ free disk space |
| 13 | +- Internet connection for GitHub and pip, etc |
| 14 | +- Python 3.6+ installed |
| 15 | + |
| 16 | +In this example, we are using the Linux platform with Python 3.6.9. If you are using Windows, most steps should still apply but a few like commands and package requirements might be different. |
| 17 | + |
| 18 | +## Step 1. Ianvs Preparation |
| 19 | + |
| 20 | +First, we download the code of Ianvs. Assuming that we are using `/ianvs` as workspace, Ianvs can be cloned with `Git` |
| 21 | +as: |
| 22 | + |
| 23 | +``` shell |
| 24 | +mkdir /ianvs |
| 25 | +cd /ianvs #One might use another path preferred |
| 26 | + |
| 27 | +mkdir project |
| 28 | +cd project |
| 29 | +git clone https://github.com/kubeedge/ianvs.git |
| 30 | +``` |
| 31 | + |
| 32 | + |
| 33 | +Then, we install third-party dependencies for ianvs. |
| 34 | +``` shell |
| 35 | +sudo apt-get update |
| 36 | +sudo apt-get install libgl1-mesa-glx -y |
| 37 | +python -m pip install --upgrade pip |
| 38 | + |
| 39 | +cd ianvs |
| 40 | +python -m pip install ./examples/resources/third_party/* |
| 41 | +python -m pip install -r requirements.txt |
| 42 | +``` |
| 43 | + |
| 44 | +We are now ready to install Ianvs. |
| 45 | +``` shell |
| 46 | +python setup.py install |
| 47 | +``` |
| 48 | + |
| 49 | +## Step 2. Dataset Preparation |
| 50 | + |
| 51 | +Datasets and models can be large. To avoid over-size projects in the Github repository of Ianvs, the Ianvs code base does |
| 52 | +not include origin datasets. Then developers do not need to download non-necessary datasets for a quick start. |
| 53 | + |
| 54 | +``` shell |
| 55 | +cd /ianvs #One might use another path preferred |
| 56 | +mkdir dataset |
| 57 | +cd dataset |
| 58 | +wget https://kubeedge.obs.cn-north-1.myhuaweicloud.com/ianvs/curb-detection/curb-detection.zip |
| 59 | +unzip dataset.zip |
| 60 | +``` |
| 61 | + |
| 62 | +The URL address of this dataset then should be filled in the configuration file ``testenv.yaml``. In this quick start, |
| 63 | +we have done that for you and the interested readers can refer to [testenv.yaml](https://ianvs.readthedocs.io/en/latest/guides/how-to-test-algorithms.html#step-1-test-environment-preparation) for more details. |
| 64 | + |
| 65 | +<!-- Please put the downloaded dataset on the above dataset path, e.g., `/ianvs/dataset`. One can transfer the dataset to the path, e.g., on a remote Linux system using [XFTP]. --> |
| 66 | + |
| 67 | + |
| 68 | +Related algorithm is also ready in this quick start. |
| 69 | +``` shell |
| 70 | +export PYTHONPATH=$PYTHONPATH:/ianvs/project/examples/curb-detection/lifelong_learning_bench/testalgorithms/rfnet/RFNet |
| 71 | +``` |
| 72 | + |
| 73 | +The URL address of this algorithm then should be filled in the configuration file ``algorithm.yaml``. In this quick |
| 74 | +start, we have done that for you and the interested readers can refer to [algorithm.yaml](https://ianvs.readthedocs.io/en/latest/guides/how-to-test-algorithms.html#step-1-test-environment-preparation) for more details. |
| 75 | + |
| 76 | +## Step 3. Ianvs Execution and Presentation |
| 77 | + |
| 78 | +We are now ready to run the ianvs for benchmarking. |
| 79 | + |
| 80 | +``` shell |
| 81 | +cd /ianvs/project |
| 82 | +ianvs -f examples/curb-detection/lifelong_learning_bench/benchmarkingjob.yaml |
| 83 | +``` |
| 84 | + |
| 85 | +Finally, the user can check the result of benchmarking on the console and also in the output path( |
| 86 | +e.g. `/ianvs/lifelong_learning_bench/workspace`) defined in the benchmarking config file ( |
| 87 | +e.g. `benchmarkingjob.yaml`). In this quick start, we have done all configurations for you and the interested readers |
| 88 | +can refer to [benchmarkingJob.yaml](https://ianvs.readthedocs.io/en/latest/guides/how-to-test-algorithms.html#step-1-test-environment-preparation) for more details. |
| 89 | + |
| 90 | +The final output might look like this: |
| 91 | + |
| 92 | +|rank |algorithm |accuracy |samples_transfer_ratio|paradigm |basemodel |task_definition |task_allocation |basemodel-learning_rate |task_definition-origins|task_allocation-origins | |
| 93 | +|:----:|:-----------------------:|:--------:|:--------------------:|:------------------:|:---------:|:--------------------:|:---------------------:|:-----------------------:|:----------------------|:-----------------------| |
| 94 | +|1 |rfnet_lifelong_learning | 0.2123 |0.4649 |lifelonglearning | BaseModel |TaskDefinitionByOrigin| TaskAllocationByOrigin|0.0001 |['real', 'sim'] |['real', 'sim'] | |
| 95 | + |
| 96 | + |
| 97 | +This ends the quick start experiment. |
| 98 | + |
| 99 | +# What is next |
| 100 | + |
| 101 | +If any problems happen, the user can refer to [the issue page on Github](https://github.com/kubeedge/ianvs/issues) for help and are also welcome to raise any new issue. |
| 102 | + |
| 103 | +Enjoy your journey on Ianvs! |
0 commit comments