Commit 80cebd84 authored by SparkSnail's avatar SparkSnail Committed by fishyds
Browse files

Refactor document of nnictl for v0.3 (#314)

* fix nnictl document
parent ed2f1bdf
......@@ -49,16 +49,30 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search
nnictl create --config ~/nni/examples/trials/mnist/config.yml
```
* Wait for the message `Info: Start experiment success!` in the command line. This message indicates that your experiment has been successfully started. You can explore the experiment using the `Web UI url`.
```diff
Info: Checking experiment...
...
Info: Starting experiment...
Info: Checking web ui...
Info: Starting web ui...
Info: Starting web ui success!
+ Info: Web UI url: http://yourlocalhost:8080 http://youripaddress:8080
+ Info: Start experiment success! The experiment id is LrNK4hae, and the restful server post is 51188.
* Wait for the message `INFO: Successfully started experiment!` in the command line. This message indicates that your experiment has been successfully started. You can explore the experiment using the `Web UI url`.
```
INFO: Starting restful server...
INFO: Successfully started Restful server!
INFO: Setting local config...
INFO: Successfully set local config!
INFO: Starting experiment...
INFO: Successfully started experiment!
-----------------------------------------------------------------------
The experiment id is egchD4qy
The Web UI urls are: http://223.255.255.1:8080 http://127.0.0.1:8080
-----------------------------------------------------------------------
You can use these commands to get more information about the experiment
-----------------------------------------------------------------------
commands description
1. nnictl experiment show show the information of experiments
2. nnictl trial ls list all of trial jobs
3. nnictl log stderr show stderr log content
4. nnictl log stdout show stdout log content
5. nnictl stop stop an experiment
6. nnictl trial kill kill a trial job by id
7. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```
## **Documentation**
......
......@@ -5,29 +5,28 @@ There are few steps to start an new experiment of nni, here are the process.
<img src="./img/experiment_process.jpg" width="50%" height="50%" />
## 2.Details
### 2.1 Check environment
The first step to start an experiment is to check whether the environment is ready, nnictl will check if there is an old experiment running or the port of restfurl server is occupied.
NNICTL will also validate the content of config yaml file, to ensure the experiment config is in correct format.
1. Check if there is an old experiment running
2. Check if the port of restfurl server is free.
3. Validate the content of config yaml file.
4. Prepare a config file to to record the information of this experiment.
### 2.2 Start restful server
After check environment, nnictl will start an restful server process to manage nni experiment, the default port is `51188`.
Start an restful server process to manage nni experiment, the default port is 8080.
### 2.3 Check restful server
Before next steps, nnictl will check whether restful server is successfully started, or the starting process will stop and show error message.
Check whether restful server process is successfully started and could get a response when send message to restful server.
### 2.4 Set experiment config
NNICTL need to set experiment config before start an experiment, experiment config includes the config values in config yaml file.
Call restful server to set experiment config before starting an experiment, experiment config includes the config values in config yaml file.
### 2.5 Check experiment cofig
NNICTL will ensure the request to set config is successfully executed.
Check the response content of restful srver, if the status code of response is 200, the config is successfully set.
### 2.6 Start WebUI
NNICTL will start a WebUI to show information,the default port of WebUI is `51188`.
### 2.6 Start Experiment
Call restful server process to setup an experiment.
### 2.7 Check WebUI
If WebUI is not successfully started, nnictl will give a warning information, and will continue to start experiment.
### 2.8 Start Experiment
This is the most import step of starting an nni experiment, nnictl will call restful server process to setup an experiment.
### 2.9 Check experiment
After start experiment, nnictl will check whether the experiment is correctly created, and show more information of this experiment to users.
### 2.7 Check experiment
1. Check the response of restful server.
2. Handle error information.
3. Print success or error information to screen.
4. Save configuration information to config file of nnictl.
docs/img/experiment_process.jpg

296 KB | W: | H:

docs/img/experiment_process.jpg

919 KB | W: | H:

docs/img/experiment_process.jpg
docs/img/experiment_process.jpg
docs/img/experiment_process.jpg
docs/img/experiment_process.jpg
  • 2-up
  • Swipe
  • Onion skin
python3 -m pip install numpy
sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo python3 -m pip install scipy
sudo python3 -m pip install sklearn
python3 -m pip install --user numpy scipy sklearn
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment