Unverified Commit 79539110 authored by Chi Song's avatar Chi Song Committed by GitHub
Browse files

Chinese translation (#1795)

parent 6d9f545a
...@@ -35,4 +35,4 @@ advisor: ...@@ -35,4 +35,4 @@ advisor:
## 示例 ## 示例
[参考示例](../../../examples/tuners/mnist_keras_customized_advisor) 参考[示例](https://github.com/microsoft/nni/tree/master/examples/tuners/mnist_keras_customized_advisor)
\ No newline at end of file \ No newline at end of file
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
* 有关 docstrings,参考 [numpydoc docstring 指南](https://numpydoc.readthedocs.io/en/latest/format.html)[pandas docstring 指南](https://python-sprints.github.io/pandas/guide/pandas_docstring.html) * 有关 docstrings,参考 [numpydoc docstring 指南](https://numpydoc.readthedocs.io/en/latest/format.html)[pandas docstring 指南](https://python-sprints.github.io/pandas/guide/pandas_docstring.html)
* 函数的 docstring, **description**, **Parameters**, 以及**Returns**/**Yields** 是必需的。 * 函数的 docstring, **description**, **Parameters**, 以及**Returns**/**Yields** 是必需的。
* 类的 docstring, **description**, **Attributes** 是必需的。 * 类的 docstring, **description**, **Attributes** 是必需的。
* 描述 `dict` 的 docstring 在超参格式描述中多处用到,参考 [RiboKit : 文档标准
* 写作标准的内部准则](https://ribokit.github.io/docs/text/)
## 文档 ## 文档
...@@ -56,4 +58,4 @@ ...@@ -56,4 +58,4 @@
* 需要链接时,尽量使用**相对路径**。 但如果文档是 Markdown 格式的,并且: * 需要链接时,尽量使用**相对路径**。 但如果文档是 Markdown 格式的,并且:
* 图片需要通过嵌入的 HTML 语法来格式化,则需要使用绝对链接,如 `https://user-images.githubusercontent.com/44491713/51381727-e3d0f780-1b4f-11e9-96ab-d26b9198ba65.png`。可以通过将图片拖拽到 [Github Issue](https://github.com/Microsoft/nni/issues/new) 框中来生成这样的链接。 * 图片需要通过嵌入的 HTML 语法来格式化,则需要使用绝对链接,如 `https://user-images.githubusercontent.com/44491713/51381727-e3d0f780-1b4f-11e9-96ab-d26b9198ba65.png`。可以通过将图片拖拽到 [Github Issue](https://github.com/Microsoft/nni/issues/new) 框中来生成这样的链接。
* 如果不能被 sphinx 重新格式化,如源代码等,则需要使用绝对链接。 如果源码连接到本代码库,使用 `https://github.com/Microsoft/nni/tree/master/` 作为根目录 (例如:[mnist.py](https://github.com/Microsoft/nni/blob/master/examples/trials/mnist/mnist.py))。 * 如果不能被 sphinx 重新格式化,如源代码等,则需要使用绝对链接。 如果源码连接到本代码库,使用 `https://github.com/Microsoft/nni/tree/master/` 作为根目录 (例如:[mnist.py](https://github.com/Microsoft/nni/blob/master/examples/trials/mnist-tfv1/mnist.py))。
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
...@@ -41,9 +41,16 @@ nnictl 在执行时,使用 tmp 目录作为临时目录来复制 codeDir 下 ...@@ -41,9 +41,16 @@ nnictl 在执行时,使用 tmp 目录作为临时目录来复制 codeDir 下
无法打开 Web 界面的链接可能有以下几个原因: 无法打开 Web 界面的链接可能有以下几个原因:
* http://127.0.0.1http://172.17.0.1 以及 http://10.0.0.15 都是 localhost。如果在服务器或远程计算机上启动 Experiment, 可将此 IP 替换为所连接的 IP 来查看 Web 界面,如 http://[远程连接的地址]:8080 * `http://127.0.0.1``http://172.17.0.1` 以及 `http://10.0.0.15` 都是 localhost。如果在服务器或远程计算机上启动 Experiment, 可将此 IP 替换为所连接的 IP 来查看 Web 界面,如 `http://[远程连接的地址]:8080`
* 如果使用服务器 IP 后还是无法看到 Web 界面,可检查此服务器上是否有防火墙或需要代理。 或使用此运行 NNI Experiment 的服务器上的浏览器来查看 Web 界面。 * 如果使用服务器 IP 后还是无法看到 Web 界面,可检查此服务器上是否有防火墙或需要代理。 或使用此运行 NNI Experiment 的服务器上的浏览器来查看 Web 界面。
* 另一个可能的原因是 Experiment 启动失败了,NNI 无法读取 Experiment 的信息。 可在如下目录中查看 NNIManager 的日志: ~/nni/experiment/[your_experiment_id] /log/nnimanager.log * 另一个可能的原因是 Experiment 启动失败了,NNI 无法读取 Experiment 的信息。 可在如下目录中查看 NNIManager 的日志: `~/nni/experiment/[your_experiment_id]` `/log/nnimanager.log`
### RESTful 服务器启动失败
可能是网络配置有问题。可检查以下问题。
* 可能需要链接 `127.0.0.1``localhost`。 在 `/etc/hosts` 中增加 `127.0.0.1 localhost`
* 也可能设置了一些代理。检查环境中是否有如 `HTTP_PROXY``HTTPS_PROXY` 的变量,如果有,则需要取消。
### NNI 在 Windows 上的问题 ### NNI 在 Windows 上的问题
......
...@@ -79,4 +79,6 @@ NNI 中有不同的错误类型。 根据严重程度,可分为三类。 当 N ...@@ -79,4 +79,6 @@ NNI 中有不同的错误类型。 根据严重程度,可分为三类。 当 N
![](../../img/trial_error.jpg) ![](../../img/trial_error.jpg)
如图,每个 Trial 都有日志路径,可以从中找到 Trial 的日志和 stderr。 如图,每个 Trial 都有日志路径,可以从中找到 Trial 的日志和 stderr。
\ No newline at end of file
除了 Experiment 级调试之外,NNI 还提供调试单个 Trial 的功能,而无需启动整个 Experiment。 有关调试单个 Trial 代码的更多信息,请参考[独立运行模式](../TrialExample/Trials.md#standalone-mode-for-debug)
\ No newline at end of file
# 安装 NNI # 安装 NNI
当前支持在 Linux,Mac 和 Windows(本机,远程和 OpenPAI 模式)下安装。 当前支持在 Linux,Mac 和 Windows 下安装。
## **在 Linux 和 Mac 下安装** ## **在 Linux 和 Mac 下安装**
......
# Windows 上的 NNI(实验阶段的功能) # Windows 上的 NNI(实验阶段的功能)
当前 Windows 上支持本机、远程和 OpenPAI 模式。 推荐 Windows 10 的 1809 版,其经过了测试。 Windows 上运行 NNI 是测试中的功能。 推荐 Windows 10 的 1809 版,其经过了测试。
## **在 Windows 上安装** ## **在 Windows 上安装**
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
完成操作后,使用 **config_windows.yml** 配置来开始 Experiment 进行验证。 完成操作后,使用 **config_windows.yml** 配置来开始 Experiment 进行验证。
```bash ```bash
nnictl create --config nni\examples\trials\mnist\config_windows.yml nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml
``` ```
同样,其它示例的 YAML 配置中也需将 Trial 命令的 `python3` 替换为 `python` 同样,其它示例的 YAML 配置中也需将 Trial 命令的 `python3` 替换为 `python`
...@@ -45,6 +45,10 @@ nnictl create --config nni\examples\trials\mnist\config_windows.yml ...@@ -45,6 +45,10 @@ nnictl create --config nni\examples\trials\mnist\config_windows.yml
当前不支持 SMAC,原因可参考[此问题](https://github.com/automl/SMAC3/issues/483) 当前不支持 SMAC,原因可参考[此问题](https://github.com/automl/SMAC3/issues/483)
### 将 Windows 服务器用作远程服务器
目前不支持。
注意: 注意:
* 如果遇到如 `Segmentation fault` 这样的任何错误,参考[常见问题](FAQ.md) * 如果遇到如 `Segmentation fault` 这样的任何错误,参考[常见问题](FAQ.md)
\ No newline at end of file
...@@ -55,19 +55,19 @@ nnictl 支持的命令: ...@@ -55,19 +55,19 @@ nnictl 支持的命令:
> 在默认端口 8080 上创建一个新的 Experiment > 在默认端口 8080 上创建一个新的 Experiment
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml nnictl create --config nni/examples/trials/mnist-tfv1/config.yml
``` ```
> 在指定的端口 8088 上创建新的 Experiment > 在指定的端口 8088 上创建新的 Experiment
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml --port 8088 nnictl create --config nni/examples/trials/mnist-tfv1/config.yml --port 8088
``` ```
> 在指定的端口 8088 上创建新的 Experiment,并启用调试模式 > 在指定的端口 8088 上创建新的 Experiment,并启用调试模式
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml --port 8088 --debug nnictl create --config nni/examples/trials/mnist-tfv1/config.yml --port 8088 --debug
``` ```
注意: 注意:
...@@ -216,10 +216,10 @@ nnictl 支持的命令: ...@@ -216,10 +216,10 @@ nnictl 支持的命令:
* 示例 * 示例
`使用 'examples/trials/mnist/search_space.json' 来更新 Experiment 的搜索空间` `使用 'examples/trials/mnist-tfv1/search_space.json' 来更新 Experiment 的搜索空间`
```bash ```bash
nnictl update searchspace [experiment_id] --filename examples/trials/mnist/search_space.json nnictl update searchspace [experiment_id] --filename examples/trials/mnist-tfv1/search_space.json
``` ```
* **nnictl update concurrency** * **nnictl update concurrency**
......
...@@ -48,7 +48,7 @@ if __name__ == '__main__': ...@@ -48,7 +48,7 @@ if __name__ == '__main__':
run_trial(params) run_trial(params)
``` ```
注意:完整实现请参考 [examples/trials/mnist/mnist_before.py](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/mnist_before.py) 注意:完整实现请参考 [examples/trials/mnist-tfv1/mnist_before.py](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1/mnist_before.py)
上面的代码一次只能尝试一组参数,如果想要调优学习率,需要手工改动超参,并一次次尝试。 上面的代码一次只能尝试一组参数,如果想要调优学习率,需要手工改动超参,并一次次尝试。
...@@ -84,7 +84,7 @@ NNI 用来帮助超参调优。它的流程如下: ...@@ -84,7 +84,7 @@ NNI 用来帮助超参调优。它的流程如下:
+ } + }
``` ```
*实现代码:[search_space.json](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/search_space.json)* *实现代码:[search_space.json](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1/search_space.json)*
**第二步**:修改 `Trial` 代码来从 NNI 获取超参,并返回 NNI 最终结果。 **第二步**:修改 `Trial` 代码来从 NNI 获取超参,并返回 NNI 最终结果。
...@@ -111,7 +111,7 @@ NNI 用来帮助超参调优。它的流程如下: ...@@ -111,7 +111,7 @@ NNI 用来帮助超参调优。它的流程如下:
run_trial(params) run_trial(params)
``` ```
*实现代码:[mnist.py](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/mnist.py)* *实现代码:[mnist.py](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1/mnist.py)*
**第三步**:定义 YAML 格式的`配置`文件,其中声明了搜索空间和 Trial 文件的`路径`,以及`其它信息`,如调优算法,最大尝试次数,最大运行时间等等。 **第三步**:定义 YAML 格式的`配置`文件,其中声明了搜索空间和 Trial 文件的`路径`,以及`其它信息`,如调优算法,最大尝试次数,最大运行时间等等。
...@@ -136,16 +136,16 @@ trial: ...@@ -136,16 +136,16 @@ trial:
注意:**在 Windows 上,需要将 Trial 命令的 `python3` 改为 `python`** 注意:**在 Windows 上,需要将 Trial 命令的 `python3` 改为 `python`**
*实现代码:[config.yml](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/config.yml)* *实现代码:[config.yml](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1/config.yml)*
上面的代码都已准备好,并保存在 [examples/trials/mnist/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist) 上面的代码都已准备好,并保存在 [examples/trials/mnist-tfv1/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist-tfv1)
#### Linux 和 macOS #### Linux 和 macOS
从命令行使用 **config.yml** 文件启动 MNIST Experiment 。 从命令行使用 **config.yml** 文件启动 MNIST Experiment 。
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config.yml nnictl create --config nni/examples/trials/mnist-tfv1/config.yml
``` ```
#### Windows #### Windows
...@@ -155,7 +155,7 @@ trial: ...@@ -155,7 +155,7 @@ trial:
**注意**:如果使用 Windows,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。 **注意**:如果使用 Windows,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。
```bash ```bash
nnictl create --config nni\examples\trials\mnist\config_windows.yml nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml
``` ```
注意:**nnictl** 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](Nnictl.md),了解 `nnictl` 更多用法。 注意:**nnictl** 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](Nnictl.md),了解 `nnictl` 更多用法。
...@@ -253,4 +253,4 @@ Experiment 相关信息会显示在界面上,配置和搜索空间等。 可 ...@@ -253,4 +253,4 @@ Experiment 相关信息会显示在界面上,配置和搜索空间等。 可
* [如何在多机上运行 Experiment?](../TrainingService/RemoteMachineMode.md) * [如何在多机上运行 Experiment?](../TrainingService/RemoteMachineMode.md)
* [如何在 OpenPAI 上运行 Experiment?](../TrainingService/PaiMode.md) * [如何在 OpenPAI 上运行 Experiment?](../TrainingService/PaiMode.md)
* [如何通过 Kubeflow 在 Kubernetes 上运行 Experiment?](../TrainingService/KubeflowMode.md) * [如何通过 Kubeflow 在 Kubernetes 上运行 Experiment?](../TrainingService/KubeflowMode.md)
* [如何通过 FrameworkController 在 Kubernetes 上运行 Experiment?](../TrainingService/FrameworkControllerMode.md) * [如何通过 FrameworkController 在 Kubernetes 上运行 Experiment?](../TrainingService/FrameworkControllerMode.md)
\ No newline at end of file
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
Trial 启动 Experiment 来检查环境。 例如,运行命令 Trial 启动 Experiment 来检查环境。 例如,运行命令
nnictl create --config ~/nni/examples/trials/mnist/config.yml nnictl create --config ~/nni/examples/trials/mnist-tfv1/config.yml
并打开网页界面查看 并打开网页界面查看
......
...@@ -6,7 +6,7 @@ Assessor 从 Trial 中接收中间结果,并通过指定的算法决定此 Tri ...@@ -6,7 +6,7 @@ Assessor 从 Trial 中接收中间结果,并通过指定的算法决定此 Tri
这是 MNIST 在使用了 'Curvefitting' Assessor 的 'maximize' 模式后的实验结果,可以看到 Assessor 成功的将大量最终结果不好的 Trial **提前结束** 。 使用 Assessor,能在相同的计算资源下,得到更好的结果。 这是 MNIST 在使用了 'Curvefitting' Assessor 的 'maximize' 模式后的实验结果,可以看到 Assessor 成功的将大量最终结果不好的 Trial **提前结束** 。 使用 Assessor,能在相同的计算资源下,得到更好的结果。
*实现代码:config_assessor.yml <https://github.com/Microsoft/nni/blob/master/examples/trials/mnist/config_assessor.yml>* *实现代码:config_assessor.yml <https://github.com/Microsoft/nni/blob/master/examples/trials/mnist-tfv1/config_assessor.yml>*
.. image:: ../img/Assessor.png .. image:: ../img/Assessor.png
......
...@@ -17,3 +17,4 @@ ...@@ -17,3 +17,4 @@
Network Morphism<Tuner/NetworkmorphismTuner> Network Morphism<Tuner/NetworkmorphismTuner>
Hyperband<Tuner/HyperbandAdvisor> Hyperband<Tuner/HyperbandAdvisor>
BOHB<Tuner/BohbAdvisor> BOHB<Tuner/BohbAdvisor>
PPO Tuner <Tuner/PPOTuner>
...@@ -28,7 +28,7 @@ author = 'Microsoft' ...@@ -28,7 +28,7 @@ author = 'Microsoft'
# The short X.Y version # The short X.Y version
version = '' version = ''
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = 'v1.1' release = 'v1.2'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
......
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
Scikit-learn<./TrialExample/SklearnExamples> Scikit-learn<./TrialExample/SklearnExamples>
EvolutionSQuAD<./TrialExample/SquadEvolutionExamples> EvolutionSQuAD<./TrialExample/SquadEvolutionExamples>
GBDT<./TrialExample/GbdtExample> GBDT<./TrialExample/GbdtExample>
RocksDB <./TrialExample/RocksdbExamples>
#################
特征工程 特征工程
################# ===================
很高兴的宣布 NNI 的特征工程包 Alpha 版本发布了。 很高兴的宣布 NNI 的特征工程包 Alpha 版本发布了。
其仍处于试验阶段,会根据使用反馈来演化。 其仍处于试验阶段,会根据使用反馈来演化。
......
################# ##############
NAS 算法 NAS 算法
################# ##############
自动化的神经网络架构(NAS)搜索在寻找更好的模型方面发挥着越来越重要的作用。 自动化的神经网络架构(NAS)搜索在寻找更好的模型方面发挥着越来越重要的作用。
最近的研究工作证明了自动化 NAS 的可行性,并发现了一些超越手动设计和调整的模型。 最近的研究工作证明了自动化 NAS 的可行性,并发现了一些超越手动设计和调整的模型。
...@@ -20,6 +20,6 @@ NAS 算法 ...@@ -20,6 +20,6 @@ NAS 算法
概述 <NAS/Overview> 概述 <NAS/Overview>
NAS 接口 <NAS/NasInterface> NAS 接口 <NAS/NasInterface>
ENAS <NAS/Overview> ENAS <NAS/ENAS>
DARTS <NAS/Overview> DARTS <NAS/DARTS>
P-DARTS <NAS/Overview> P-DARTS <NAS/Overview>
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
配置<Tutorial/ExperimentConfig> 配置<Tutorial/ExperimentConfig>
搜索空间<Tutorial/SearchSpaceSpec> 搜索空间<Tutorial/SearchSpaceSpec>
实现训练平台<TrainingService/HowToImplementTrainingService> 实现训练平台<TrainingService/HowToImplementTrainingService>
Framework Library <SupportedFramework_Library>
...@@ -2,8 +2,9 @@ NNI 支持的训练平台介绍 ...@@ -2,8 +2,9 @@ NNI 支持的训练平台介绍
===================================== =====================================
.. toctree:: .. toctree::
概述 <./TrainingService/SupportTrainingService>
本机<./TrainingService/LocalMode> 本机<./TrainingService/LocalMode>
远程<./TrainingService/RemoteMachineMode> 远程<./TrainingService/RemoteMachineMode>
OpenPAI<./TrainingService/PaiMode> OpenPAI<./TrainingService/PaiMode>
Kubeflow<./TrainingService/KubeflowMode> Kubeflow<./TrainingService/KubeflowMode>
FrameworkController<./TrainingService/FrameworkControllerMode> FrameworkController<./TrainingService/FrameworkControllerMode>
\ No newline at end of file
...@@ -113,22 +113,18 @@ ...@@ -113,22 +113,18 @@
gpuNum: 0 gpuNum: 0
cpuNum: 1 cpuNum: 1
memoryMB: 32869 memoryMB: 32869
#在 OpenPAI 上运行 NNI 任务的 Docker 映像 # 在 OpenPAI 上运行 NNI 的 Docker 映像
image: msranni/nni:latest image: msranni/nni:latest
#在 OpenPAI 的 hdfs 目录上存储数据的目录,如:'hdfs://host:port/directory'
dataDir: hdfs://10.10.10.10:9000/username/nni
#在 OpenPAI 的 hdfs 目录上存储输出的目录,如:'hdfs://host:port/directory'
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig: paiConfig:
#登录 OpenPAI 的用户名 # 登录 OpenPAI 的用户名
userName: username userName: username
#登录 OpenPAI 的密码 # 登录 OpenPAI 的密码
passWord: password passWord: password
# OpenPAI 的 RESTful 服务器地址 # OpenPAI 的 RestFUL 服务器地址
host: 10.10.10.10 host: 10.10.10.10
将默认值改为个人账户和服务器信息。 包括 `nniManagerIp`, `dataDir`, `outputDir`, `userName`, `passWord``host` 将默认值改为个人账户和服务器信息。 包括 `nniManagerIp`, `userName`, `passWord``host`.
在 "trial" 部分中,如果需要使用 GPU 来进行架构搜索,可将 `gpuNum``0` 改为 `1`。 根据训练时长,可以增加 `maxTrialNum``maxExecDuration` 在 "trial" 部分中,如果需要使用 GPU 来进行架构搜索,可将 `gpuNum``0` 改为 `1`。 根据训练时长,可以增加 `maxTrialNum``maxExecDuration`
......
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