From 74e9031a81c934c02098440d8805a8b0c32e2417 Mon Sep 17 00:00:00 2001 From: SparkSnail Date: Mon, 21 Jan 2019 13:00:00 +0800 Subject: [PATCH] Update doc: refactor ExperimentConfig.md (#602) * fix doc * add link in doc * update * add nnictl package cmd --- docs/ExperimentConfig.md | 17 ++++++-- docs/NNICTLDOC.md | 83 +++++++++++++++++++++++++++------------- 2 files changed, 69 insertions(+), 31 deletions(-) diff --git a/docs/ExperimentConfig.md b/docs/ExperimentConfig.md index 33a5f96633..c6caae4a0b 100644 --- a/docs/ExperimentConfig.md +++ b/docs/ExperimentConfig.md @@ -3,6 +3,12 @@ A config file is needed when create an experiment, the path of the config file is provide to nnictl. The config file is written in yaml format, and need to be written correctly. This document describes the rule to write config file, and will provide some examples and templates. + + - [Template](#Template) (the templates of an config file) + - [Configuration spec](#Configuration) (the configuration specification of every attribute in config file) + - [Examples](#Examples) (the examples of config file) + + ## Template * __light weight(without Annotation and Assessor)__ ``` @@ -107,7 +113,8 @@ machineList: username: passwd: ``` -## Configuration + +## Configuration spec * __authorName__ * Description @@ -123,14 +130,16 @@ machineList: * __trialConcurrency__ * Description - __trialConcurrency__ specifies the max num of trial jobs run simultaneously. + __trialConcurrency__ specifies the max num of trial jobs run simultaneously. - Note: if trialGpuNum is bigger than the free gpu numbers, and the trial jobs running simultaneously can not reach trialConcurrency number, some trial jobs will be put into a queue to wait for gpu allocation. + Note: if trialGpuNum is bigger than the free gpu numbers, and the trial jobs running simultaneously can not reach trialConcurrency number, some trial jobs will be put into a queue to wait for gpu allocation. * __maxExecDuration__ * Description __maxExecDuration__ specifies the max duration time of an experiment.The unit of the time is {__s__, __m__, __h__, __d__}, which means {_seconds_, _minutes_, _hours_, _days_}. + + Note: The maxExecDuration spec set the time of an experiment, not a trial job. If the experiment reach the max duration time, the experiment will not stop, but could not submit new trial jobs any more. * __maxTrialNum__ * Description @@ -421,7 +430,7 @@ machineList: - + ## Examples * __local mode__ diff --git a/docs/NNICTLDOC.md b/docs/NNICTLDOC.md index a2d9e11fb7..0ab53a73d6 100644 --- a/docs/NNICTLDOC.md +++ b/docs/NNICTLDOC.md @@ -5,20 +5,23 @@ __nnictl__ is a command line tool, which can be used to control experiments, suc ## Commands nnictl support commands: -``` -nnictl create -nnictl stop -nnictl update -nnictl resume -nnictl trial -nnictl experiment -nnictl config -nnictl log -nnictl webui -nnictl tensorboard -nnictl top -``` + - [nnictl create](#create) + - [nnictl resume](#resume) + - [nnictl stop](#stop) + - [nnictl update](#update) + - [nnictl trial](#trial) + - [nnictl top](#top) + - [nnictl experiment](#experiment) + - [nnictl config](#config) + - [nnictl log](#log) + - [nnictl webui](#webui) + - [nnictl tensorboard](#tensorboard) + - [nnictl package](#package) + + + ### Manage an experiment + * __nnictl create__ * Description @@ -37,7 +40,7 @@ nnictl top | ------ | ------ | ------ |------ | | --config, -c| True| |yaml configure file of the experiment| | --port, -p | False| |the port of restful server| - + * __nnictl resume__ * Description @@ -56,7 +59,7 @@ nnictl top - + * __nnictl stop__ * Description @@ -74,7 +77,7 @@ nnictl top 4.If the id does not exist but match the prefix of an experiment id, nnictl will stop the matched experiment. 5.If the id does not exist but match multiple prefix of the experiment ids, nnictl will give id information. 6.Users could use 'nnictl stop all' to stop all experiments - + * __nnictl update__ * __nnictl update searchspace__ @@ -142,7 +145,7 @@ nnictl top | --value, -v| True| |the new number of maxtrialnum you want to set| - + * __nnictl trial__ * __nnictl trial ls__ * Description @@ -173,10 +176,10 @@ nnictl top | ------ | ------ | ------ |------ | | id| False| |ID of the experiment you want to set| | --trialid, -t| True| |ID of the trial you want to kill.| - - * __nnictl top__ - - * Description + +* __nnictl top__ + + * Description Monitor all of running experiments. @@ -192,7 +195,7 @@ nnictl top | --time, -t| False| |The interval to update the experiment status, the unit of time is second, and the default value is 3 second.| - + ### Manage experiment information * __nnictl experiment show__ @@ -240,7 +243,7 @@ nnictl top | all| False| False|Show all of experiments, including stopped experiments.| - + * __nnictl config show__ * Description @@ -250,7 +253,7 @@ nnictl top nnictl config show - + ### Manage log * __nnictl log stdout__ * Description @@ -305,7 +308,7 @@ nnictl top | ------ | ------ | ------ |------ | | id| False| |the id of trial| - + ### Manage webui * __nnictl webui url__ * Description @@ -322,7 +325,7 @@ nnictl top | ------ | ------ | ------ |------ | | id| False| |ID of the experiment you want to set| - + ### Manage tensorboard * __nnictl tensorboard start__ * Description @@ -362,4 +365,30 @@ nnictl top | Name, shorthand | Required|Default | Description | | ------ | ------ | ------ |------ | - | id| False| |ID of the experiment you want to set| \ No newline at end of file + | id| False| |ID of the experiment you want to set| + + +### Manage package +* __nnictl package install__ + * Description + + Install the packages needed in nni experiments. + + * Usage + + nnictl package install [OPTIONS] + + Options: + + | Name, shorthand | Required|Default | Description | + | ------ | ------ | ------ |------ | + | --name| True| |The name of package to be installed| + +* __nnictl package show__ + * Description + + List the packages supported. + + * Usage + + nnictl package show