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

Chinese translation (#1041)

parent 8a175cd4
......@@ -10,7 +10,7 @@
NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包。 它通过多种调优的算法来搜索最好的神经网络结构和(或)超参,并支持单机、本地多机、云等不同的运行环境。
### **NNI [v0.6](https://github.com/Microsoft/nni/releases) 已发布!**
### **NNI [v0.7](https://github.com/Microsoft/nni/releases) 已发布!**
<p align="center">
<a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a>
......@@ -98,78 +98,118 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包
## **安装和验证**
在 Windows 本机模式下,并且是第一次使用 PowerShell 来运行脚本,需要**使用管理员权限**运行一次下列命令:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
**通过 pip 命令安装**
* 当前支持 Linux 和 MacOS。测试并支持的版本包括:Ubuntu 16.04 及更高版本,MacOS 10.14.1。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
* 当前支持 Linux,MacOS 和 Windows(本机模式),在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
Linux 和 MacOS
```bash
python3 -m pip install --upgrade nni
python3 -m pip install --upgrade nni
```
Windows
```bash
python -m pip install --upgrade nni
```
注意:
* 如果需要将 NNI 安装到自己的 home 目录中,可使用 `--user`,这样也不需要任何特殊权限。
* 当前 NNI 在 Windows 上仅支持本机模式。 强烈推荐使用 Anaconda 在 Windows 上安装 NNI。
* 如果遇到如`Segmentation fault` 这样的任何错误请参考[常见问题](docs/zh_CN/FAQ.md)
**通过源代码安装**
* 当前支持 Linux(Ubuntu 16.04 及更高版本) 和 MacOS(10.14.1)。
* 当前支持 Linux(Ubuntu 16.04 或更高版本),MacOS(10.14.1)以及 Windows 10(1809 版)下的本机模式。
Linux 和 MacOS
*`python >= 3.5` 的环境中运行命令: `git``wget`,确保安装了这两个组件。
```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git
cd nni
source install.sh
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
source install.sh
```
Windows
*`python >=3.5` 的环境中运行命令: `git``PowerShell`,确保安装了这两个组件。
```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
```
参考[安装 NNI](docs/zh_CN/Installation.md) 了解系统需求。
参考 [NNI Windows 本机模式](docs/zh_CN/WindowsLocalMode.md),了解更多信息。
**验证安装**
以下示例 Experiment 依赖于 TensorFlow 。 在运行前确保安装了 **TensorFlow**
* 通过克隆源代码下载示例。
* 通过克隆源代码下载示例。
```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git
git clone -b v0.7 https://github.com/Microsoft/nni.git
```
* 运行 mnist 示例。
Linux 和 macOS
* 运行 MNIST 示例。
```bash
nnictl create --config nni/examples/trials/mnist/config.yml
```
Windows
* 运行 MNIST 示例。
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
* 在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。
```
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 top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](docs/zh_CN/WebUI.md)更多页面示例
```text
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 top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```
* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](docs/zh_CN/WebUI.md)更多页面。
<table style="border: none">
<th><img src="./docs/img/webui_overview_page.png" alt="drawing" width="395"/></th>
......
......@@ -12,7 +12,7 @@
scikit-learn 0.20.0
pandas 0.23.4
lightgbm 2.2.2
NNI v0.6
NNI v0.7
此 Dockerfile 可作为定制的参考。
......
......@@ -51,15 +51,15 @@
powershell
Python >= 3.5
Pip
Node.js
Yarn
tar
* **如何生成**
参数 `version_os` 用来选择使用 64 位还是 32 位 Windows 来生成。
```bash
powershell ./install.ps1
powershell ./install.ps1 -version_os [64/32]
```
* **如何上传**
......
# 超参数优化的对比
*匿名作者*
超参优化算法在几个问题上的对比。
超参数优化算法如下:
- [Random Search(随机搜索)](../Builtin_Tuner.md#Random)
- [Grid Search(遍历搜索)](../Builtin_Tuner.md#Random)
- [Evolution](../Builtin_Tuner.md#Evolution)
- [Anneal(退火算法)](../Builtin_Tuner.md#Anneal)
- [Metis](../Builtin_Tuner.md#MetisTuner)
- [TPE](../Builtin_Tuner.md#TPE)
- [SMAC](../Builtin_Tuner.md#SMAC)
- [HyperBand](../Builtin_Tuner.md#Hyperband)
- [BOHB](../Builtin_Tuner.md#BOHB)
所有算法都在 NNI 本机环境下运行。
环境:
OS: Linux Ubuntu 16.04 LTS
CPU: Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz 2600 MHz
Memory: 112 GB
NNI Version: v0.7
NNI 模式(local|pai|remote): local
Python 版本: 3.6
使用的虚拟环境: Conda
是否在 Docker 中运行: no
## AutoGBDT 示例
### 问题描述
超参搜索上的非凸问题 [AutoGBDT](../gbdt_example.md)
### 搜索空间
```json
{
"num_leaves": {
"_type": "choice",
"_value": [10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 48, 64, 96, 128]
},
"learning_rate": {
"_type": "choice",
"_value": [0.00001, 0.0001, 0.001, 0.01, 0.05, 0.1, 0.2, 0.5]
},
"max_depth": {
"_type": "choice",
"_value": [-1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 48, 64, 96, 128]
},
"feature_fraction": {
"_type": "choice",
"_value": [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]
},
"bagging_fraction": {
"_type": "choice",
"_value": [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]
},
"bagging_freq": {
"_type": "choice",
"_value": [1, 2, 4, 8, 10, 12, 14, 16]
}
}
```
总搜索空间为 1, 204, 224 次,将最大 Trial 次数设置为1000。 时间限制为 48 小时。
### 结果
| 算法 | 最好的损失值 | 最好的 5 次损失的平均值 | 最好的 10 次损失的平均 |
| ------------- | ------------ | ------------- | ------------- |
| Random Search | 0.418854 | 0.420352 | 0.421553 |
| Random Search | 0.417364 | 0.420024 | 0.420997 |
| Random Search | 0.417861 | 0.419744 | 0.420642 |
| Grid Search | 0.498166 | 0.498166 | 0.498166 |
| Evolution | 0.409887 | 0.409887 | 0.409887 |
| Evolution | 0.413620 | 0.413875 | 0.414067 |
| Evolution | 0.409887 | 0.409887 | 0.409887 |
| Anneal | 0.414877 | 0.417289 | 0.418281 |
| Anneal | 0.409887 | 0.409887 | 0.410118 |
| Anneal | 0.413683 | 0.416949 | 0.417537 |
| Metis | 0.416273 | 0.420411 | 0.422380 |
| Metis | 0.420262 | 0.423175 | 0.424816 |
| Metis | 0.421027 | 0.424172 | 0.425714 |
| TPE | 0.414478 | 0.414478 | 0.414478 |
| TPE | 0.415077 | 0.417986 | 0.418797 |
| TPE | 0.415077 | 0.417009 | 0.418053 |
| SMAC | **0.408386** | **0.408386** | **0.408386** |
| SMAC | 0.414012 | 0.414012 | 0.414012 |
| SMAC | **0.408386** | **0.408386** | **0.408386** |
| BOHB | 0.410464 | 0.415319 | 0.417755 |
| BOHB | 0.418995 | 0.420268 | 0.422604 |
| BOHB | 0.415149 | 0.418072 | 0.418932 |
| HyperBand | 0.414065 | 0.415222 | 0.417628 |
| HyperBand | 0.416807 | 0.417549 | 0.418828 |
| HyperBand | 0.415550 | 0.415977 | 0.417186 |
Metis 算法因为其高斯计算过程的复杂度为 O(n^3) 而运行非常慢,因此仅执行了 300 次 Trial。
## RocksDB 的 'fillrandom' 和 'readrandom' 基准测试
### 问题描述
[DB_Bench](https://github.com/facebook/rocksdb/wiki/Benchmarking-tools) 是用来做 [RocksDB](https://rocksdb.org/) 性能基准测试的工具。 有多个参数需要调优。
`DB_Bench` 的性能与计算机配置和安装方法有关。 在 `DB_Bench` Linux 系统上运行,并将 Rock 作为共享库安装。
#### 计算机配置
RocksDB: version 6.1
CPU: 6 * Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz
CPUCache: 35840 KB
Keys: 16 bytes each
Values: 100 bytes each (50 bytes after compression)
Entries: 1000000
#### 存储性能
**延迟**:每个 IO 请求都需要一些时间才能完成,这称为平均延迟。 有几个因素会影响此时间,包括网络连接质量和硬盘IO性能。
**IOPS****每秒的 IO 操作数量**,这意味着可以在一秒钟内完成的*读取或写入操作次数*
**IO 大小****每个 IO 请求的大小**。 根据操作系统和需要磁盘访问的应用程序、服务,它将同时发出读取或写入一定数量数据的请求。
**吞吐量(以 MB/s 为单位)= 平均 IO 大小 x IOPS **
IOPS 与在线处理能力有关,我们在实验中使用 IOPS 作为指标。
### 搜索空间
```json
{
"max_background_compactions": {
"_type": "quniform",
"_value": [1, 256, 1]
},
"block_size": {
"_type": "quniform",
"_value": [1, 500000, 1]
},
"write_buffer_size": {
"_type": "quniform",
"_value": [1, 130000000, 1]
},
"max_write_buffer_number": {
"_type": "quniform",
"_value": [1, 128, 1]
},
"min_write_buffer_number_to_merge": {
"_type": "quniform",
"_value": [1, 32, 1]
},
"level0_file_num_compaction_trigger": {
"_type": "quniform",
"_value": [1, 256, 1]
},
"level0_slowdown_writes_trigger": {
"_type": "quniform",
"_value": [1, 1024, 1]
},
"level0_stop_writes_trigger": {
"_type": "quniform",
"_value": [1, 1024, 1]
},
"cache_size": {
"_type": "quniform",
"_value": [1, 30000000, 1]
},
"compaction_readahead_size": {
"_type": "quniform",
"_value": [1, 30000000, 1]
},
"new_table_reader_for_compaction_inputs": {
"_type": "randint",
"_value": [1]
}
}
```
搜索空间非常大(约10 的 40 次方),将最大 Trial 次数设置为 100 以限制资源。
### 结果
#### fillrandom 基准
| 模型 | 最高 IOPS(重复 1 次) | 最高 IOPS(重复 2 次) | 最高 IOPS(重复 3 次) |
| --------- | --------------- | --------------- | --------------- |
| Random | 449901 | 427620 | 477174 |
| Anneal | 461896 | 467150 | 437528 |
| Evolution | 436755 | 389956 | 389790 |
| TPE | 378346 | 482316 | 468989 |
| SMAC | 491067 | 490472 | **491136** |
| Metis | 444920 | 457060 | 454438 |
图:
![](../../img/hpo_rocksdb_fillrandom.png)
#### readrandom 基准
| 模型 | 最高 IOPS(重复 1 次) | 最高 IOPS(重复 2 次) | 最高 IOPS(重复 3 次) |
| --------- | --------------- | --------------- | --------------- |
| Random | 2276157 | 2285301 | 2275142 |
| Anneal | 2286330 | 2282229 | 2284012 |
| Evolution | 2286524 | 2283673 | 2283558 |
| TPE | 2287366 | 2282865 | 2281891 |
| SMAC | 2270874 | 2284904 | 2282266 |
| Metis | **2287696** | 2283496 | 2277701 |
图:
![](../../img/hpo_rocksdb_readrandom.png)
\ No newline at end of file
# NAS 算法对比
# 神经网络结构搜索的对比
*匿名作者*
训练并对比 Autokeras, DARTS, ENAS 和 NAO 这些算法的效果
训练和比较 NAS(神经网络架构搜索)的模型,包括 AutokerasDARTSENAS 和 NAO。
源码链接如下:
......
......@@ -5,4 +5,5 @@
.. toctree::
:maxdepth: 2
NAS 算法比较<NASComparison>
超参优化的对比<HPOComparison>
神经网络结构搜索(NAS)的对比<NASComparison>
\ No newline at end of file
......@@ -2,7 +2,7 @@
NNI 提供了先进的调优算法,使用上也很简单。 下面是内置 Tuner 的简单介绍:
注意:点击 **Tuner 的名称**可跳转到算法的详细描述,点击**用法**可看到 Tuner 的安装要求、建议场景和使用样例等等。
注意:点击 **Tuner 的名称**可跳转到算法的详细描述,点击**用法**可看到 Tuner 的安装要求、建议场景和使用样例等等。 [此文章](./Blog/HPOComparison.md)对比了不同 Tuner 在几个问题下的不同效果。
当前支持的 Tuner:
......@@ -132,6 +132,8 @@ tuner:
> 名称:**SMAC**
**当前 SMAC 不支持在 WIndows 下运行。 原因参考:[github issue](https://github.com/automl/SMAC3/issues/483).**
**安装**
SMAC 在第一次使用前,必须用下面的命令先安装。
......
......@@ -37,6 +37,10 @@ nnictl 在执行时,使用 tmp 目录作为临时目录来复制 codeDir 下
将虚拟机的网络配置为桥接模式来让虚拟机能被网络访问,并确保虚拟机的防火墙没有禁止相关端口。
### Windows 本机模式
参考 [NNI Windows 本机模式](WindowsLocalMode.md)
### 帮助改进
在创建新问题前,请在 https://github.com/Microsoft/nni/issues 查看是否有人已经报告了相似的问题。
\ No newline at end of file
# 安装 NNI
当前支持在 Linux,Mac 和 Windows 下安装。
当前支持在 Linux,Mac 和 Windows(本机模式)下安装。
## **在 Linux 和 Mac 下安装**
......@@ -17,7 +17,7 @@
先决条件:`python >=3.5`, `git`, `wget`
```bash
git clone -b v0.6 https://github.com/Microsoft/nni.git
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
./install.sh
```
......@@ -28,9 +28,14 @@
## **在 Windows 上安装**
在第一次使用 PowerShell 运行脚本时,需要用**使用管理员权限**运行如下命令:
bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted 强烈推荐使用 Anaconda。
* **通过 pip 命令安装 NNI**
先决条件:`python >= 3.5`
先决条件:`python(64-bit) >= 3.5`
```bash
python -m pip install --upgrade nni
......@@ -39,16 +44,10 @@
* **通过源代码安装 NNI**
先决条件:`python >=3.5`, `git`, `powershell`
在第一次使用 PowerShell 时,需要作为管理员运行此命令:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
然后可以使用管理员或当前用户安装 NNI:
可使用管理员或当前用户权限运行下列命令:
```bash
git clone https://github.com/Microsoft/nni.git
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
```
......@@ -79,7 +78,7 @@
| **网络** | 宽带连接 | |
| **分辨率** | 1024 x 768 以上 | |
以下是 NNI 在 Windows 的最低配置。 由于程序变更,NNI 的最低配置会有所更改。
以下是 NNI 在 Windows 的最低配置,推荐使用 Windows 10 1809 版。 由于程序变更,NNI 的最低配置会有所更改。
| | 最低配置 | 推荐配置 |
| -------- | ------------------------------------- | ----------------------------------------- |
......
......@@ -2,15 +2,31 @@
## 安装
当前支持 Linux 和 MacOS。测试并支持的版本包括:Ubuntu 16.04 及更高版本,MacOS 10.14.1。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
当前支持 Linux,MacOS 和 Windows(本机模式),在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
#### Linux 和 MacOS
```bash
python3 -m pip install --upgrade nni
```
#### Windows
如果选择 Windows 本机模式并使用 PowerShell 运行脚本,需要首次以管理员身份在 PowerShell 环境中运行以下命令。
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
然后通过 pip 安装 NNI:
```bash
python -m pip install --upgrade nni
```
注意:
* 如果要将 NNI 安装到自己的 home 目录中,可使用 `--user`这样也不需要任何特殊权限。
* 在 Linux 和 MacOS 上,如果要将 NNI 安装到当前用户的 home 目录中,可使用 `--user`不需要特殊权限。
* 如果遇到如`Segmentation fault` 这样的任何错误请参考[常见问题](FAQ.md)
* 参考[安装 NNI](Installation.md),来了解`系统需求`
......@@ -18,7 +34,7 @@
NNI 是一个能进行自动机器学习实验的工具包。 它可以自动进行获取超参、运行 Trial,测试结果,调优超参的循环。 下面会展示如何使用 NNI 来找到最佳超参组合。
这是**没有 NNI** 的样例代码,用 CNN 在 MNIST 数据集上训练:
这是**没有 NNI** 的样例代码,用 CNN 在 MNIST 数据集上训练:
```python
def run_trial(params):
......@@ -44,19 +60,20 @@ if __name__ == '__main__':
上面的代码一次只能尝试一组参数,如果想要调优学习率,需要手工改动超参,并一次次尝试。
NNI 就是用来帮助调优工作的。它的工作流程如下:
NNI 用来帮助超参调优。它的流程如下:
```pseudo
输入: 搜索空间, Trial 代码, 配置文件
输出: 一组最优的参数配置
输入: 搜索空间, Trial 代码, 配置文件
输出: 一组最佳的超参配置
1: For t = 0, 1, 2, ..., maxTrialNum,
2: hyperparameter = 从搜索空间选择一组参数
3: final result = run_trial_and_evaluate(hyperparameter)
4: 返回最终结果给 NNI
5: If 时间达到上限,
6: 停止实验
7: return 最好的实验结果
1: For t = 0, 1, 2, ..., maxTrialNum,
2: hyperparameter = 从搜索空间选择一组参数
3: final result = run_trial_and_evaluate(hyperparameter)
4: 返回最终结果给 NNI
5: If 时间达到上限,
6: 停止实验
7: 返回最好的实验结果
```
如果需要使用 NNI 来自动训练模型,找到最佳超参,需要如下三步:
......@@ -126,45 +143,60 @@ trial:
gpuNum: 0
```
注意:**在 Windows 上,需要将 Trial 命令的 `python3` 改为 `python`**
*实现代码:[config.yml](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist/config.yml)*
上面的代码都已准备好,并保存在 [examples/trials/mnist/](https://github.com/Microsoft/nni/tree/master/examples/trials/mnist)
上述步骤完成后,**从命令行运行 config.yml 文件来开始 Experiment**
#### Linux 和 macOS
从命令行使用 **config.yml** 文件启动 MNIST Experiment 。
```bash
nnictl create --config nni/examples/trials/mnist/config.yml
```
#### Windows
从命令行使用 **config_windows.yml** 文件启动 MNIST Experiment 。
**注意**:如果使用了 Windows 本机模式,则需要在 config.yml 文件中,将 `python3` 改为 `python`,或者使用 config_windows.yml 来开始 Experiment。
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
注意:**nnictl** 是一个命令行工具,用来控制 NNI Experiment,如启动、停止、继续 Experiment,启动、停止 NNIBoard 等等。 查看[这里](NNICTLDOC.md),了解 `nnictl` 更多用法。
在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 期望的输出如下:
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: [Your IP]: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 top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```text
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: [Your IP]: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 top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```
如果根据上述步骤准备好了相应 `Trial`, `搜索空间``配置`,并成功创建的 NNI 任务。NNI 会自动开始通过配置的搜索空间来运行不同的超参集合,搜索最好的超参。 通过 Web 界面可看到 NNI 的进度。
......@@ -172,8 +204,9 @@ trial:
启动 Experiment 后,可以在命令行界面找到如下的 `Web 界面地址`
The Web UI urls are: [IP 地址]:8080
```text
The Web UI urls are: [IP 地址]:8080
```
在浏览器中打开 `Web 界面地址`(即:`[IP 地址]:8080`),就可以看到 Experiment 的详细信息,以及所有的 Trial 任务。
......
# 更改日志
## 发布 0.7 - 4/29/2018
### 主要功能
* [支持在 Windows 上使用 NNI](./WindowsLocalMode.md)
* NNI 可在 Windows 上使用本机模式
* [支持新的 Advisor: BOHB](./bohbAdvisor.md)
* 支持新的 BOHB Advisor,这是一个健壮而有效的超参调优算法,囊括了贝叶斯优化和 Hyperband 的优点
* [支持通过 nnictl 来导入导出 Experiment 数据](./NNICTLDOC.md#experiment)
* 在 Experiment 执行完后,可生成分析结果报告
* 支持将先前的调优数据导入到 Tuner 和 Advisor 中
* [可为 NNI Trial 任务指定 GPU](./ExperimentConfig.md#localConfig)
* 通过 gpuIndices 配置来为 Trial 任务指定GPU。如果 Experiment 配置文件中有 gpuIndices,则只有指定的 GPU 会被用于 NNI 的 Trial 任务。
* 改进 Web 界面
* 在 Web 界面上使用十进制格式的指标
* 添加多阶段训练相关的提示
* 可将超参复制为 Python dict 格式
* 可将提前终止的 Trial 数据传入 Tuner。
* 为 nnictl 提供更友好的错误消息
* 为 YAML 文件格式错误提供更有意义的错误信息
### Bug 修复
* 运行 nnictl stop 的异步 Dispatcher 模式时,无法杀掉所有的 Python 线程
* nnictl --version 不能在 make dev-install 下使用
* OpenPAI 平台下所有的 Trial 任务状态都是 'WAITING'
## 发布 0.6 - 4/2/2019
### 主要功能
* [版本检查](https://github.com/Microsoft/nni/blob/master/docs/en_US/PAIMode.md#version-check)
* 检查 nniManager 和 trialKeeper 的版本是否一致
* [提前终止的任务也可返回最终指标](https://github.com/Microsoft/nni/issues/776)
* 如果 includeIntermediateResults 为 true,最后一个 Assessor 的中间结果会被发送给 Tuner 作为最终结果。 includeIntermediateResults 的默认值为 false。
* [分离 Tuner/Assessor](https://github.com/Microsoft/nni/issues/841)
* 增加两个管道来分离 Tuner 和 Assessor 的消息
* 使日志集合功能可配置
* 为所有 Trial 增加中间结果的视图
### Bug 修复
* [为 OpenPAI 增加 shmMB 配置](https://github.com/Microsoft/nni/issues/842)
* 修复在指标为 dict 时,无法显示任何结果的 Bug。
* 修复 hyperband 中浮点类型的计算问题
* 修复 SMAC Tuner 中搜索空间转换的错误
* 修复 Web 界面中解析 Experiment 的错误格式
* 修复 Metis Tuner 冷启动时的错误
## 发布 0.5.2 - 3/4/2019
### 改进
......@@ -30,7 +79,7 @@
### 文档
* 重新组织文档,新的主页位置:https://nni.readthedocs.io/en/latest/
* 重新组织文档,新的主页位置:https://nni.readthedocs.io/zh/latest/
### Bug 修复和其它更新
......@@ -44,7 +93,7 @@
#### 支持新的 Tuner 和 Assessor
* 支持新的 [Metis Tuner](metisTuner.md)对于**在线**超参调优的场景,Metis 算法已经被证明非常有效。
* 支持新的 [Metis Tuner](metisTuner.md)**在线**超参调优的场景,Metis 算法已经被证明非常有效。
* 支持 [ENAS customized tuner](https://github.com/countif/enas_nni)。由 GitHub 社区用户所贡献。它是神经网络的搜索算法,能够通过强化学习来学习神经网络架构,比 NAS 的性能更好。
* 支持 [Curve fitting (曲线拟合)Assessor](curvefittingAssessor.md),通过曲线拟合的策略来实现提前终止 Trial。
* 进一步支持 [Weight Sharing(权重共享)](./AdvancedNAS.md):为 NAS Tuner 通过 NFS 来提供权重共享。
......@@ -164,7 +213,7 @@
### 新样例
*的 NNI Docker 映像:
*的 NNI Docker 映像:
```bash
docker pull msranni/nni:latest
......
# Windows 本地模式(测试中)
当前 Windows 下仅支持本机模式。 推荐 Windows 10 的 1809 版,其经过了测试。
## **在 Windows 上安装**
**强烈推荐使用 Anaconda python(64 位)。**
在第一次使用 PowerShell 运行脚本时,需要用**使用管理员权限**运行如下命令:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
* **通过 pip 命令安装 NNI**
先决条件:`python(64-bit) >= 3.5`
```bash
python -m pip install --upgrade nni
```
* __通过代码安装 NNI__
先决条件: `python >=3.5`, `git`, `powershell`
```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
```
运行完以上脚本后,从命令行使用 **config_windows.yml** 来启动 Experiment,完成安装验证。
```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
```
同样,其它示例的 YAML 配置中也需将 Trial 命令的 `python3` 替换为 `python`
## **常见问答**
### 安装 NNI 时出现 simplejson 错误
确保安装了 C++ 14.0 编译器。
> building 'simplejson._speedups' extension error: [WinError 3] The system cannot find the path specified
### 从源代码安装 NNI 时,遇到 PowerShell 错误
如果第一次运行 PowerShell 脚本,且没有设置过执行脚本的策略,会遇到下列错误。 需要以管理员身份运行此命令:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
> ...cannot be loaded because running scripts is disabled on this system.
### 在命令行或 PowerShell 中,Trial 因为缺少 DLL 而失败
此错误因为缺少 LIBIFCOREMD.DLL 和 LIBMMD.DLL 文件,且 SciPy 安装失败。 使用 Anaconda Python(64-bit) 可解决此问题。
> ImportError: DLL load failed
### Web 界面上的 Trial 错误
检查 Trial 日志文件来了解详情。 如果没有日志文件,且 NNI 是通过 pip 安装的,则需要在管理员权限下先运行以下命令:
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
如果存在 stderr 文件,也需要查看其内容。 可能的错误情况包括:
* 忘记将 Experiment 配置的 Trial 命令中的 `python3` 改为 `python`
* 忘记安装 Experiment 的依赖,如 TensorFlow,Keras 等。
### 无法在 Windows 上使用 BOHB
确保安装了 C ++ 14.0 编译器然后尝试运行 `nnictl package install --name=BOHB` 来安装依赖项。
### Windows 上不支持的 Tuner
当前不支持 SMAC,原因可参考[此问题](https://github.com/automl/SMAC3/issues/483)
注意:
* 如果遇到 `Segmentation fault` 这样的错误,参考[常见问答](FAQ.md)
\ No newline at end of file
......@@ -28,7 +28,7 @@ author = 'Microsoft'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = 'v0.6'
release = 'v0.7'
# -- General configuration ---------------------------------------------------
......
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