Skip to content

Commit

Permalink
Merge pull request #19 from microsoft/master
Browse files Browse the repository at this point in the history
pull code
  • Loading branch information
chicm-ms authored May 31, 2019
2 parents 841d467 + e267a73 commit 611a45f
Show file tree
Hide file tree
Showing 158 changed files with 2,675 additions and 835 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ We encourage researchers and students leverage these projects to accelerate the

## **Install & Verify**

If you choose NNI Windows local mode and you use PowerShell to run script for the first time, you need to **run PowerShell as administrator** with this command first:
If you are using NNI on Windows and use PowerShell to run script for the first time, you need to **run PowerShell as administrator** with this command first:

```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```

**Install through pip**

* We support Linux, MacOS and Windows(local mode) in current stage, Ubuntu 16.04 or higher, MacOS 10.14.1 along with Windows 10.1809 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`.
* We support Linux, MacOS and Windows(local, remote and pai mode) in current stage, Ubuntu 16.04 or higher, MacOS 10.14.1 along with Windows 10.1809 are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`.

Linux and MacOS

Expand All @@ -131,12 +131,12 @@ python -m pip install --upgrade nni
Note:

* `--user` can be added if you want to install NNI in your home directory, which does not require any special privileges.
* Currently NNI on Windows only support local mode. Anaconda or Miniconda is highly recommended to install NNI on Windows.
* Currently NNI on Windows support local, remote and pai mode. Anaconda or Miniconda is highly recommended to install NNI on Windows.
* If there is any error like `Segmentation fault`, please refer to [FAQ](docs/en_US/FAQ.md)

**Install through source code**

* We support Linux (Ubuntu 16.04 or higher), MacOS (10.14.1) and Windows local mode (10.1809) in our current stage.
* We support Linux (Ubuntu 16.04 or higher), MacOS (10.14.1) and Windows (10.1809) in our current stage.

Linux and MacOS

Expand All @@ -155,12 +155,12 @@ Windows
```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni
powershell ./install.ps1
powershell .\install.ps1
```

For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md)

For NNI Windows local mode, please refer to [NNI Windows local mode](docs/en_US/WindowsLocalMode.md)
For NNI on Windows, please refer to [NNI on Windows](docs/en_US/NniOnWindows.md)

**Verify install**

Expand All @@ -185,7 +185,7 @@ Windows
* Run the MNIST example.

```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml
nnictl create --config nni\examples\trials\mnist\config_windows.yml
```

* 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`.
Expand Down
63 changes: 33 additions & 30 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,32 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包
</ul>
</td>
<td>
<a href="docs/zh_CN/Builtin_Tuner.md">Tuner(调参器)</a>
<a href="docs/zh_CN/BuiltinTuner.md">Tuner(调参器)</a>
<ul>
<li><a href="docs/zh_CN/Builtin_Tuner.md#TPE">TPE</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Random">Random Search(随机搜索)</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Anneal">Anneal(退火算法)</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Evolution">Naive Evolution(进化算法)</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#SMAC">SMAC</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Batch">Batch(批处理)</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Grid">Grid Search(遍历搜索)</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#Hyperband">Hyperband</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#NetworkMorphism">Network Morphism</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#TPE">TPE</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Random">Random Search(随机搜索)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Anneal">Anneal(退火算法)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Evolution">Naive Evolution(进化算法)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#SMAC">SMAC</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Batch">Batch(批处理)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Grid">Grid Search(遍历搜索)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Hyperband">Hyperband</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#NetworkMorphism">Network Morphism</a></li>
<li><a href="examples/tuners/enas_nni/README_zh_CN.md">ENAS</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#NetworkMorphism#MetisTuner">Metis Tuner</a></li>
<li><a href="docs/zh_CN/Builtin_Tuner.md#BOHB">BOHB</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#NetworkMorphism#MetisTuner">Metis Tuner</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#BOHB">BOHB</a></li>
</ul>
<a href="docs/zh_CN/Builtin_Assessors.md#assessor">Assessor(评估器)</a>
<a href="docs/zh_CN/BuiltinAssessors.md#assessor">Assessor(评估器)</a>
<ul>
<li><a href="docs/zh_CN/Builtin_Assessors.md#Medianstop">Median Stop</a></li>
<li><a href="docs/zh_CN/Builtin_Assessors.md#Curvefitting">Curve Fitting</a></li>
<li><a href="docs/zh_CN/BuiltinAssessors.md#Medianstop">Median Stop</a></li>
<li><a href="docs/zh_CN/BuiltinAssessors.md#Curvefitting">Curve Fitting</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="docs/zh_CN/LocalMode.md">本地计算机</a></li>
<li><a href="docs/zh_CN/RemoteMachineMode.md">远程计算机</a></li>
<li><a href="docs/zh_CN/PAIMode.md">OpenPAI</a></li>
<li><a href="docs/zh_CN/PaiMode.md">OpenPAI</a></li>
<li><a href="docs/zh_CN/KubeflowMode.md">Kubeflow</a></li>
<li><a href="docs/zh_CN/FrameworkControllerMode.md">基于 Kubernetes(AKS 等等)的 FrameworkController</a></li>
</ul>
Expand All @@ -94,7 +94,10 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包

* [OpenPAI](https://github.com/Microsoft/pai):作为开源平台,提供了完整的 AI 模型训练和资源管理能力,能轻松扩展,并支持各种规模的私有部署、云和混合环境。
* [FrameworkController](https://github.com/Microsoft/frameworkcontroller):开源的通用 Kubernetes Pod 控制器,通过单个控制器来编排 Kubernetes 上所有类型的应用。
* [MMdnn](https://github.com/Microsoft/MMdnn):一个完整、跨框架的解决方案,能够转换、可视化、诊断深度神经网络模型。 MMdnn 中的 "MM" 表示model management(模型管理),而 "dnn" 是 deep neural network(深度神经网络)的缩写。 我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。
* [MMdnn](https://github.com/Microsoft/MMdnn):一个完整、跨框架的解决方案,能够转换、可视化、诊断深度神经网络模型。 MMdnn 中的 "MM" 表示model management(模型管理),而 "dnn" 是 deep neural network(深度神经网络)的缩写。
* [SPTAG](https://github.com/Microsoft/SPTAG) : Space Partition Tree And Graph (SPTAG) 是用于大规模向量的最近邻搜索场景的开源库。

我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。

## **安装和验证**

Expand All @@ -106,9 +109,9 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包

**通过 pip 命令安装**

* 当前支持 Linux,MacOS 和 Windows(本机模式),在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。
* 当前支持 Linux,MacOS 和 Windows(本机,远程,OpenPAI 模式),在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 `python >= 3.5` 的环境中,只需要运行 `pip install` 即可完成安装。

Linux 和 MacOS
Linux 和 macOS

```bash
python3 -m pip install --upgrade nni
Expand All @@ -123,14 +126,14 @@ python -m pip install --upgrade nni
注意:

* 如果需要将 NNI 安装到自己的 home 目录中,可使用 `--user`,这样也不需要任何特殊权限。
* 当前 NNI 在 Windows 上仅支持本机模式。 强烈推荐使用 Anaconda 在 Windows 上安装 NNI。
* 目前,Windows 上的 NNI 支持本机,远程和 OpenPAI 模式。 强烈推荐使用 Anaconda 或 Miniconda 在 Windows 上安装 NNI。
* 如果遇到如`Segmentation fault` 这样的任何错误请参考[常见问题](docs/zh_CN/FAQ.md)

**通过源代码安装**

* 当前支持 Linux(Ubuntu 16.04 或更高版本),MacOS(10.14.1)以及 Windows 10(1809 版)下的本机模式
* 当前支持 Linux(Ubuntu 16.04 或更高版本),MacOS(10.14.1)以及 Windows 10(1809 版)。

Linux 和 MacOS
Linux 和 macOS

*`python >= 3.5` 的环境中运行命令: `git``wget`,确保安装了这两个组件。

Expand All @@ -152,7 +155,7 @@ Windows

参考[安装 NNI](docs/zh_CN/Installation.md) 了解系统需求。

参考 [NNI Windows 本机模式](docs/zh_CN/WindowsLocalMode.md),了解更多信息
Windows 上参考 [Windows 上使用 NNI](docs/zh_CN/NniOnWindows.md)

**验证安装**

Expand Down Expand Up @@ -224,24 +227,24 @@ You can use these commands to get more information about the experiment
## **入门**

* [安装 NNI](docs/zh_CN/Installation.md)
* [使用命令行工具 nnictl](docs/zh_CN/NNICTLDOC.md)
* [使用命令行工具 nnictl](docs/zh_CN/Nnictl.md)
* [使用 NNIBoard](docs/zh_CN/WebUI.md)
* [如何定义搜索空间](docs/zh_CN/SearchSpaceSpec.md)
* [如何编写 Trial 代码](docs/zh_CN/Trials.md)
* [如何选择 Tuner、搜索算法](docs/zh_CN/Builtin_Tuner.md)
* [如何选择 Tuner、搜索算法](docs/zh_CN/BuiltinTuner.md)
* [配置 Experiment](docs/zh_CN/ExperimentConfig.md)
* [如何使用 Annotation](docs/zh_CN/Trials.md#nni-python-annotation)

## **教程**

* [在本机运行 Experiment (支持多 GPU 卡)](docs/zh_CN/LocalMode.md)
* [在多机上运行 Experiment](docs/zh_CN/RemoteMachineMode.md)
* [在 OpenPAI 上运行 Experiment](docs/zh_CN/PAIMode.md)
* [在 OpenPAI 上运行 Experiment](docs/zh_CN/PaiMode.md)
* [在 Kubeflow 上运行 Experiment。](docs/zh_CN/KubeflowMode.md)
* [尝试不同的 Tuner](docs/zh_CN/tuners.rst)
* [尝试不同的 Assessor](docs/zh_CN/assessors.rst)
* [实现自定义 Tuner](docs/zh_CN/Customize_Tuner.md)
* [实现自定义 Assessor](docs/zh_CN/Customize_Assessor.md)
* [实现自定义 Tuner](docs/zh_CN/CustomizeTuner.md)
* [实现自定义 Assessor](docs/zh_CN/CustomizeAssessor.md)
* [使用进化算法为阅读理解任务找到好模型](examples/trials/ga_squad/README_zh_CN.md)

## **贡献**
Expand All @@ -250,9 +253,9 @@ You can use these commands to get more information about the experiment

推荐新贡献者从标有 **good first issue** 的简单需求开始。

如要安装 NNI 开发环境,参考: [配置 NNI 开发环境](docs/zh_CN/SetupNNIDeveloperEnvironment.md)
如要安装 NNI 开发环境,参考:[配置 NNI 开发环境](docs/zh_CN/SetupNniDeveloperEnvironment.md)

在写代码之前,请查看并熟悉 NNI 代码贡献指南:[贡献](docs/zh_CN/CONTRIBUTING.md)
在写代码之前,请查看并熟悉 NNI 代码贡献指南:[贡献](docs/zh_CN/Contributing.md)

我们正在编写[如何调试](docs/zh_CN/HowToDebug.md) 的页面,欢迎提交建议和问题。

Expand Down
18 changes: 12 additions & 6 deletions deployment/pypi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,28 @@ ifeq ($(version_ts), true)
NNI_VERSION_VALUE := $(NNI_VERSION_VALUE).$(TIME_STAMP)
endif
NNI_VERSION_TEMPLATE = 999.0.0-developing

NNI_YARN_TARBALL ?= $(CWD)nni-yarn.tar.gz
NNI_YARN_FOLDER ?= $(CWD)nni-yarn
NNI_YARN := PATH=$(CWD)node-$(OS_SPEC)-x64/bin:$${PATH} $(NNI_YARN_FOLDER)/bin/yarn
.PHONY: build
build:
python3 -m pip install --user --upgrade setuptools wheel
wget https://aka.ms/nni/nodejs-download/$(OS_SPEC) -O $(CWD)node-$(OS_SPEC)-x64.tar.xz
wget -q https://aka.ms/nni/nodejs-download/$(OS_SPEC) -O $(CWD)node-$(OS_SPEC)-x64.tar.xz
rm -rf $(CWD)node-$(OS_SPEC)-x64
mkdir $(CWD)node-$(OS_SPEC)-x64
tar xf $(CWD)node-$(OS_SPEC)-x64.tar.xz -C node-$(OS_SPEC)-x64 --strip-components 1
cd $(CWD)../../src/nni_manager && yarn && yarn build
cd $(CWD)../../src/webui && yarn && yarn build
wget -q https://aka.ms/yarn-download -O $(NNI_YARN_TARBALL)
rm -rf $(NNI_YARN_FOLDER)
mkdir $(NNI_YARN_FOLDER)
tar -xf $(NNI_YARN_TARBALL) -C $(NNI_YARN_FOLDER) --strip-components 1
cd $(CWD)../../src/nni_manager && $(NNI_YARN) && $(NNI_YARN) build
cd $(CWD)../../src/webui && $(NNI_YARN) && $(NNI_YARN) build
rm -rf $(CWD)nni
cp -r $(CWD)../../src/nni_manager/dist $(CWD)nni
cp -r $(CWD)../../src/webui/build $(CWD)nni/static
cp $(CWD)../../src/nni_manager/package.json $(CWD)nni
sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' $(CWD)nni/package.json
cd $(CWD)nni && yarn --prod
cd $(CWD)nni && $(NNI_YARN) --prod
cd $(CWD) && sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' setup.py && python3 setup.py bdist_wheel -p $(WHEEL_SPEC)
cd $(CWD)

Expand All @@ -50,4 +56,4 @@ clean:
rm -rf $(CWD)dist
rm -rf $(CWD)nni
rm -rf $(CWD)nni.egg-info
rm -rf $(CWD)node-$(OS_SPEC)-x64
rm -rf $(CWD)node-$(OS_SPEC)-x64
4 changes: 2 additions & 2 deletions docs/en_US/AnnotationSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ There are 10 types to express your search space as follows:

* `@nni.variable(nni.choice(option1,option2,...,optionN),name=variable)`
Which means the variable value is one of the options, which should be a list The elements of options can themselves be stochastic expressions
* `@nni.variable(nni.randint(upper),name=variable)`
Which means the variable value is a random integer in the range [0, upper).
* `@nni.variable(nni.randint(lower, upper),name=variable)`
Which means the variable value is a value like round(uniform(low, high)). For now, the type of chosen value is float. If you want to use integer value, please convert it explicitly.
* `@nni.variable(nni.uniform(low, high),name=variable)`
Which means the variable value is a value uniformly between low and high.
* `@nni.variable(nni.quniform(low, high, q),name=variable)`
Expand Down
2 changes: 1 addition & 1 deletion docs/en_US/BuiltinTuner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NNI provides state-of-the-art tuning algorithm as our builtin-tuners and makes them easy to use. Below is the brief summary of NNI currently built-in Tuners:

Note: Click the **Tuner's name** to get a detailed description of the algorithm, click the corresponding **Usage** to get the Tuner's installation requirements, suggested scenario and using example. Here is an [article](./Blog/HPOComparison.md) about the comparison of different Tuners on several problems.
Note: Click the **Tuner's name** to get a detailed description of the algorithm, click the corresponding **Usage** to get the Tuner's installation requirements, suggested scenario and using example. Here is an [article](./CommunitySharings/HPOComparison.md) about the comparison of different Tuners on several problems.

Currently we support the following algorithms:

Expand Down
17 changes: 17 additions & 0 deletions docs/en_US/ExperimentConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,15 @@ machineList:

__gpuIndices__ is used to specify designated GPU devices for NNI, if it is set, only the specified GPU devices are used for NNI trial jobs. Single or multiple GPU indices can be specified, multiple GPU indices are seperated by comma(,), such as `1` or `0,1,3`.

* __maxTrialNumPerGpu__

__maxTrialNumPerGpu__ is used to specify the max concurrency trial number on a GPU device.

* __useActiveGpu__

__useActiveGpu__ is used to specify whether to use a GPU if there is another process. By default, NNI will use the GPU only if there is no another active process in the GPU, if __useActiveGpu__ is set to true, NNI will use the GPU regardless of another processes. This field is not applicable for NNI on Windows.


* __machineList__

__machineList__ should be set if __trainingServicePlatform__ is set to remote, or it should be empty.
Expand Down Expand Up @@ -433,6 +442,14 @@ machineList:

__gpuIndices__ is used to specify designated GPU devices for NNI on this remote machine, if it is set, only the specified GPU devices are used for NNI trial jobs. Single or multiple GPU indices can be specified, multiple GPU indices are seperated by comma(,), such as `1` or `0,1,3`.

* __maxTrialNumPerGpu__

__maxTrialNumPerGpu__ is used to specify the max concurrency trial number on a GPU device.

* __useActiveGpu__

__useActiveGpu__ is used to specify whether to use a GPU if there is another process. By default, NNI will use the GPU only if there is no another active process in the GPU, if __useActiveGpu__ is set to true, NNI will use the GPU regardless of another processes. This field is not applicable for NNI on Windows.

* __kubeflowConfig__:

* __operator__
Expand Down
4 changes: 2 additions & 2 deletions docs/en_US/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Unable to open the WebUI may have the following reasons:
* If you still can't see the WebUI after you use the server IP, you can check the proxy and the firewall of your machine. Or use the browser on the machine where you start your NNI experiment.
* Another reason may be your experiment is failed and NNI may fail to get the experiment infomation. You can check the log of NNImanager in the following directory: ~/nni/experiment/[your_experiment_id] /log/nnimanager.log

### Windows local mode problems
Please refer to [NNI Windows local mode](WindowsLocalMode.md)
### NNI on Windows problems
Please refer to [NNI on Windows](NniOnWindows.md)

### Help us improve
Please inquiry the problem in https://github.com/Microsoft/nni/issues to see whether there are other people already reported the problem, create a new one if there are no existing issues been created.
Loading

0 comments on commit 611a45f

Please sign in to comment.