Commit 3caf4cec authored by LongzeSong's avatar LongzeSong Committed by xuehui
Browse files

modify docs (#1759)

* modify docs

* "nni_search_space.json" -> "search_space.json"
parent 4b1961e2
...@@ -96,7 +96,7 @@ This command will be filled in the YAML configure file below. Please refer to [h ...@@ -96,7 +96,7 @@ This command will be filled in the YAML configure file below. Please refer to [h
**Prepare configure file**: Since you have already known which trial code you are going to run and which tuner you are going to use, it is time to prepare the YAML configure file. NNI provides a demo configure file for each trial example, `cat ~/nni/examples/trials/mnist-annotation/config.yml` to see it. Its content is basically shown below: **Prepare configure file**: Since you have already known which trial code you are going to run and which tuner you are going to use, it is time to prepare the YAML configure file. NNI provides a demo configure file for each trial example, `cat ~/nni/examples/trials/mnist-annotation/config.yml` to see it. Its content is basically shown below:
``` ```yaml
authorName: your_name authorName: your_name
experimentName: auto_mnist experimentName: auto_mnist
...@@ -112,6 +112,9 @@ maxTrialNum: 100 ...@@ -112,6 +112,9 @@ maxTrialNum: 100
# choice: local, remote # choice: local, remote
trainingServicePlatform: local trainingServicePlatform: local
# search space file
searchSpacePath: search_space.json
# choice: true, false # choice: true, false
useAnnotation: true useAnnotation: true
tuner: tuner:
......
...@@ -19,6 +19,8 @@ maxExecDuration: 3h ...@@ -19,6 +19,8 @@ maxExecDuration: 3h
maxTrialNum: 100 maxTrialNum: 100
# choice: local, remote, pai # choice: local, remote, pai
trainingServicePlatform: pai trainingServicePlatform: pai
# search space file
searchSpacePath: search_space.json
# choice: true, false # choice: true, false
useAnnotation: true useAnnotation: true
tuner: tuner:
......
...@@ -28,6 +28,8 @@ maxExecDuration: 1h ...@@ -28,6 +28,8 @@ maxExecDuration: 1h
maxTrialNum: 10 maxTrialNum: 10
#choice: local, remote, pai #choice: local, remote, pai
trainingServicePlatform: remote trainingServicePlatform: remote
# search space file
searchSpacePath: search_space.json
#choice: true, false #choice: true, false
useAnnotation: true useAnnotation: true
tuner: tuner:
......
...@@ -98,33 +98,36 @@ ...@@ -98,33 +98,36 @@
*builtinTunerName* 用来指定 NNI 中的 Tuner,*classArgs* 是传入到 Tuner的参数(内置 Tuner 在[这里](../Tuner/BuiltinTuner.md)),*optimization_mode* 表明需要最大化还是最小化 Trial 的结果。 *builtinTunerName* 用来指定 NNI 中的 Tuner,*classArgs* 是传入到 Tuner的参数(内置 Tuner 在[这里](../Tuner/BuiltinTuner.md)),*optimization_mode* 表明需要最大化还是最小化 Trial 的结果。
**准备配置文件**:实现 Trial 的代码,并选择或实现自定义的 Tuner 后,就要准备 YAML 配置文件了。 NNI 为每个 Trial 样例都提供了演示的配置文件,用命令`cat ~/nni/examples/trials/mnist-annotation/config.yml` 来查看其内容。 大致内容如下: **准备配置文件**:实现 Trial 的代码,并选择或实现自定义的 Tuner 后,就要准备 YAML 配置文件了。 NNI 为每个 Trial 样例都提供了演示的配置文件,用命令`cat ~/nni/examples/trials/mnist-annotation/config.yml` 来查看其内容。 大致内容如下:
```yaml
authorName: your_name authorName: your_name
experimentName: auto_mnist experimentName: auto_mnist
# 并发运行数量 # 并发运行数量
trialConcurrency: 2 trialConcurrency: 2
# Experiment 运行时间 # Experiment 运行时间
maxExecDuration: 3h maxExecDuration: 3h
# 可为空,即数量不限 # 可为空,即数量不限
maxTrialNum: 100 maxTrialNum: 100
# 可选值为: local, remote # 可选值为: local, remote
trainingServicePlatform: local trainingServicePlatform: local
# 可选值为: true, false # 搜索空间文件
useAnnotation: true searchSpacePath: search_space.json
tuner:
builtinTunerName: TPE # 可选值为: true, false
classArgs: useAnnotation: true
optimize_mode: maximize tuner:
trial: builtinTunerName: TPE
command: python mnist.py classArgs:
codeDir: ~/nni/examples/trials/mnist-annotation optimize_mode: maximize
gpuNum: 0 trial:
command: python mnist.py
codeDir: ~/nni/examples/trialsmnist-annotation
gpuNum: 0
```
因为这个 Trial 代码使用了 NNI Annotation 的方法(参考[这里](../Tutorial/AnnotationSpec.md) ),所以*useAnnotation* 为 true。 *command* 是运行 Trial 代码所需要的命令,*codeDir* 是 Trial 代码的相对位置。 命令会在此目录中执行。 同时,也需要提供每个 Trial 进程所需的 GPU 数量。 因为这个 Trial 代码使用了 NNI Annotation 的方法(参考[这里](../Tutorial/AnnotationSpec.md) ),所以*useAnnotation* 为 true。 *command* 是运行 Trial 代码所需要的命令,*codeDir* 是 Trial 代码的相对位置。 命令会在此目录中执行。 同时,也需要提供每个 Trial 进程所需的 GPU 数量。
......
...@@ -21,6 +21,8 @@ maxExecDuration: 3h ...@@ -21,6 +21,8 @@ maxExecDuration: 3h
maxTrialNum: 100 maxTrialNum: 100
# 可选项: local, remote, pai # 可选项: local, remote, pai
trainingServicePlatform: pai trainingServicePlatform: pai
# 搜索空间文件
searchSpacePath: search_space.json
# 可选项: true, false # 可选项: true, false
useAnnotation: true useAnnotation: true
tuner: tuner:
......
...@@ -28,6 +28,8 @@ maxExecDuration: 1h ...@@ -28,6 +28,8 @@ maxExecDuration: 1h
maxTrialNum: 10 maxTrialNum: 10
#可选项: local, remote, pai #可选项: local, remote, pai
trainingServicePlatform: remote trainingServicePlatform: remote
# 搜索空间文件
searchSpacePath: search_space.json
#可选项: true, false #可选项: true, false
useAnnotation: true useAnnotation: true
tuner: tuner:
......
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