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 ...@@ -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 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`. * 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`.
```diff ```
Info: Checking experiment... INFO: Starting restful server...
... INFO: Successfully started Restful server!
Info: Starting experiment... INFO: Setting local config...
Info: Checking web ui... INFO: Successfully set local config!
Info: Starting web ui... INFO: Starting experiment...
Info: Starting web ui success! INFO: Successfully started experiment!
+ 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. 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** ## **Documentation**
......
...@@ -5,29 +5,28 @@ There are few steps to start an new experiment of nni, here are the process. ...@@ -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%" /> <img src="./img/experiment_process.jpg" width="50%" height="50%" />
## 2.Details ## 2.Details
### 2.1 Check environment ### 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. 1. Check if there is an old experiment running
NNICTL will also validate the content of config yaml file, to ensure the experiment config is in correct format. 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 ### 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 ### 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 ### 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 ### 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 ### 2.6 Start Experiment
NNICTL will start a WebUI to show information,the default port of WebUI is `51188`. Call restful server process to setup an experiment.
### 2.7 Check WebUI ### 2.7 Check experiment
If WebUI is not successfully started, nnictl will give a warning information, and will continue to start experiment. 1. Check the response of restful server.
2. Handle error information.
### 2.8 Start Experiment 3. Print success or error information to screen.
This is the most import step of starting an nni experiment, nnictl will call restful server process to setup an experiment. 4. Save configuration information to config file of nnictl.
### 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.
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 apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo python3 -m pip install scipy python3 -m pip install --user numpy scipy sklearn
sudo python3 -m pip install 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