Unverified Commit 12410686 authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Merge pull request #20 from microsoft/master

pull code
parents 611a45fc 61fec446
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
[简体中文](README_zh_CN.md) [简体中文](README_zh_CN.md)
NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning (AutoML) experiments. NNI (Neural Network Intelligence) is a toolkit to help users run automated machine learning (AutoML) experiments.
The tool dispatches and runs trial jobs generated by tuning algorithms to search the best neural architecture and/or hyper-parameters in different environments like local machine, remote servers and cloud. The tool dispatches and runs trial jobs generated by tuning algorithms to search the best neural architecture and/or hyper-parameters in different environments like local machine, remote servers and cloud.
### **NNI [v0.7](https://github.com/Microsoft/nni/releases) has been released!** ### **NNI [v0.8](https://github.com/Microsoft/nni/releases) has been released!**
<p align="center"> <p align="center">
<a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a> <a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a>
</p> </p>
...@@ -57,20 +57,20 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search ...@@ -57,20 +57,20 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search
<li><a href="docs/en_US/BuiltinTuner.md#TPE">TPE</a></li> <li><a href="docs/en_US/BuiltinTuner.md#TPE">TPE</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Random">Random Search</a></li> <li><a href="docs/en_US/BuiltinTuner.md#Random">Random Search</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Anneal">Anneal</a></li> <li><a href="docs/en_US/BuiltinTuner.md#Anneal">Anneal</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Evolution">Naive Evolution</a></li> <li><a href="docs/en_US/BuiltinTuner.md#Evolution">Naïve Evolution</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#SMAC">SMAC</a></li> <li><a href="docs/en_US/BuiltinTuner.md#SMAC">SMAC</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Batch">Batch</a></li> <li><a href="docs/en_US/BuiltinTuner.md#Batch">Batch</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Grid">Grid Search</a></li> <li><a href="docs/en_US/BuiltinTuner.md#GridSearch">Grid Search</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#Hyperband">Hyperband</a></li> <li><a href="docs/en_US/BuiltinTuner.md#Hyperband">Hyperband</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#NetworkMorphism">Network Morphism</a></li> <li><a href="docs/en_US/BuiltinTuner.md#NetworkMorphism">Network Morphism</a></li>
<li><a href="examples/tuners/enas_nni/README.md">ENAS</a></li> <li><a href="examples/tuners/enas_nni/README.md">ENAS</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#NetworkMorphism#MetisTuner">Metis Tuner</a></li> <li><a href="docs/en_US/BuiltinTuner.md#MetisTuner">Metis Tuner</a></li>
<li><a href="docs/en_US/BuiltinTuner.md#BOHB">BOHB</a></li> <li><a href="docs/en_US/BuiltinTuner.md#BOHB">BOHB</a></li>
</ul> </ul>
<a href="docs/en_US/BuiltinAssessors.md#assessor">Assessor</a> <a href="docs/en_US/BuiltinAssessor.md">Assessor</a>
<ul> <ul>
<li><a href="docs/en_US/BuiltinAssessors.md#Medianstop">Median Stop</a></li> <li><a href="docs/en_US/BuiltinAssessor.md#Medianstop">Median Stop</a></li>
<li><a href="docs/en_US/BuiltinAssessors.md#Curvefitting">Curve Fitting</a></li> <li><a href="docs/en_US/BuiltinAssessor.md#Curvefitting">Curve Fitting</a></li>
</ul> </ul>
</td> </td>
<td> <td>
...@@ -106,13 +106,7 @@ We encourage researchers and students leverage these projects to accelerate the ...@@ -106,13 +106,7 @@ We encourage researchers and students leverage these projects to accelerate the
## **Install & Verify** ## **Install & Verify**
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: **Install through pip**
```bash
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```
**Install through pip**
* 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`. * 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`.
...@@ -136,14 +130,14 @@ Note: ...@@ -136,14 +130,14 @@ Note:
**Install through source code** **Install through source code**
* We support Linux (Ubuntu 16.04 or higher), MacOS (10.14.1) and Windows (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 Linux and MacOS
* Run the following commands in an environment that has `python >= 3.5`, `git` and `wget`. * Run the following commands in an environment that has `python >= 3.5`, `git` and `wget`.
```bash ```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git git clone -b v0.8 https://github.com/Microsoft/nni.git
cd nni cd nni
source install.sh source install.sh
``` ```
...@@ -153,9 +147,9 @@ Windows ...@@ -153,9 +147,9 @@ Windows
* Run the following commands in an environment that has `python >=3.5`, `git` and `PowerShell` * Run the following commands in an environment that has `python >=3.5`, `git` and `PowerShell`
```bash ```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git git clone -b v0.8 https://github.com/Microsoft/nni.git
cd nni cd nni
powershell .\install.ps1 powershell -ExecutionPolicy Bypass -file install.ps1
``` ```
For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md) For the system requirements of NNI, please refer to [Install NNI](docs/en_US/Installation.md)
...@@ -169,7 +163,7 @@ The following example is an experiment built on TensorFlow. Make sure you have * ...@@ -169,7 +163,7 @@ The following example is an experiment built on TensorFlow. Make sure you have *
* Download the examples via clone the source code. * Download the examples via clone the source code.
```bash ```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git git clone -b v0.8 https://github.com/Microsoft/nni.git
``` ```
Linux and MacOS Linux and MacOS
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包。 它通过多种调优的算法来搜索最好的神经网络结构和(或)超参,并支持单机、本地多机、云等不同的运行环境。 NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包。 它通过多种调优的算法来搜索最好的神经网络结构和(或)超参,并支持单机、本地多机、云等不同的运行环境。
### **NNI [v0.7](https://github.com/Microsoft/nni/releases) 已发布!** ### **NNI [v0.8](https://github.com/Microsoft/nni/releases) 已发布!**
<p align="center"> <p align="center">
<a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a> <a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a>
...@@ -55,14 +55,14 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包 ...@@ -55,14 +55,14 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包
<li><a href="docs/zh_CN/BuiltinTuner.md#Evolution">Naive Evolution(进化算法)</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#SMAC">SMAC</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Batch">Batch(批处理)</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#GridSearch">Grid Search(遍历搜索)</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#Hyperband">Hyperband</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="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="examples/tuners/enas_nni/README_zh_CN.md">ENAS</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#NetworkMorphism#MetisTuner">Metis Tuner</a></li> <li><a href="docs/zh_CN/BuiltinTuner.md#MetisTuner">Metis Tuner</a></li>
<li><a href="docs/zh_CN/BuiltinTuner.md#BOHB">BOHB</a></li> <li><a href="docs/zh_CN/BuiltinTuner.md#BOHB">BOHB</a></li>
</ul> </ul>
<a href="docs/zh_CN/BuiltinAssessors.md#assessor">Assessor(评估器)</a> <a href="docs/zh_CN/BuiltinAssessors.md">Assessor(评估器)</a>
<ul> <ul>
<li><a href="docs/zh_CN/BuiltinAssessors.md#Medianstop">Median Stop</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> <li><a href="docs/zh_CN/BuiltinAssessors.md#Curvefitting">Curve Fitting</a></li>
...@@ -150,7 +150,7 @@ Windows ...@@ -150,7 +150,7 @@ Windows
```bash ```bash
git clone -b v0.7 https://github.com/Microsoft/nni.git git clone -b v0.7 https://github.com/Microsoft/nni.git
cd nni cd nni
powershell ./install.ps1 powershell .\install.ps1
``` ```
参考[安装 NNI](docs/zh_CN/Installation.md) 了解系统需求。 参考[安装 NNI](docs/zh_CN/Installation.md) 了解系统需求。
...@@ -180,7 +180,7 @@ Windows ...@@ -180,7 +180,7 @@ Windows
* 运行 MNIST 示例。 * 运行 MNIST 示例。
```bash ```bash
nnictl create --config nni/examples/trials/mnist/config_windows.yml nnictl create --config nni\examples\trials\mnist\config_windows.yml
``` ```
* 在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。 * 在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。
......
...@@ -31,7 +31,7 @@ RUN DEBIAN_FRONTEND=noninteractive && \ ...@@ -31,7 +31,7 @@ RUN DEBIAN_FRONTEND=noninteractive && \
vim \ vim \
unzip \ unzip \
wget \ wget \
build-essential \ build-essential \
cmake \ cmake \
libopenblas-dev \ libopenblas-dev \
automake \ automake \
...@@ -51,9 +51,9 @@ RUN DEBIAN_FRONTEND=noninteractive && \ ...@@ -51,9 +51,9 @@ RUN DEBIAN_FRONTEND=noninteractive && \
# #
RUN python3 -m pip install --upgrade pip RUN python3 -m pip install --upgrade pip
# numpy 1.14.3 scipy 1.1.0 # numpy 1.14.3 scipy 1.1.0
RUN python3 -m pip --no-cache-dir install \ RUN python3 -m pip --no-cache-dir install \
numpy==1.14.3 scipy==1.1.0 numpy==1.14.3 scipy==1.1.0
# #
# Tensorflow 1.10.0 # Tensorflow 1.10.0
...@@ -66,7 +66,7 @@ RUN python3 -m pip --no-cache-dir install tensorflow-gpu==1.10.0 ...@@ -66,7 +66,7 @@ RUN python3 -m pip --no-cache-dir install tensorflow-gpu==1.10.0
RUN python3 -m pip --no-cache-dir install Keras==2.1.6 RUN python3 -m pip --no-cache-dir install Keras==2.1.6
# #
# PyTorch # PyTorch
# #
RUN python3 -m pip --no-cache-dir install torch==0.4.1 RUN python3 -m pip --no-cache-dir install torch==0.4.1
RUN python3 -m pip install torchvision==0.2.1 RUN python3 -m pip install torchvision==0.2.1
......
...@@ -14,11 +14,11 @@ pandas 0.23.4 ...@@ -14,11 +14,11 @@ pandas 0.23.4
lightgbm 2.2.2 lightgbm 2.2.2
NNI v0.7 NNI v0.7
``` ```
You can take this Dockerfile as a reference for your own customized Dockerfile. You can take this Dockerfile as a reference for your own customized Dockerfile.
## 2.How to build and run ## 2.How to build and run
__Use the following command from `nni/deployment/docker` to build docker image__ __Use the following command from `nni/deployment/docker` to build docker image__
``` ```
docker build -t nni/nni . docker build -t nni/nni .
``` ```
__Run the docker image__ __Run the docker image__
......
...@@ -7,7 +7,7 @@ ifeq ($(UNAME_S), Linux) ...@@ -7,7 +7,7 @@ ifeq ($(UNAME_S), Linux)
else ifeq ($(UNAME_S), Darwin) else ifeq ($(UNAME_S), Darwin)
OS_SPEC := darwin OS_SPEC := darwin
WHEEL_SPEC := macosx_10_9_x86_64 WHEEL_SPEC := macosx_10_9_x86_64
else else
$(error platform $(UNAME_S) not supported) $(error platform $(UNAME_S) not supported)
endif endif
......
...@@ -43,7 +43,7 @@ $env:PATH = $NNI_NODE_FOLDER+';'+$env:PATH ...@@ -43,7 +43,7 @@ $env:PATH = $NNI_NODE_FOLDER+';'+$env:PATH
cd $CWD\..\..\src\nni_manager cd $CWD\..\..\src\nni_manager
yarn yarn
yarn build yarn build
cd $CWD\..\..\src\webui cd $CWD\..\..\src\webui
yarn yarn
yarn build yarn build
if(Test-Path $CWD\nni){ if(Test-Path $CWD\nni){
......
...@@ -75,7 +75,8 @@ setuptools.setup( ...@@ -75,7 +75,8 @@ setuptools.setup(
'numpy', 'numpy',
'scipy', 'scipy',
'coverage', 'coverage',
'colorama' 'colorama',
'sklearn'
], ],
classifiers = [ classifiers = [
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
......
...@@ -88,4 +88,4 @@ For details, please refer to this [simple weight sharing example](https://github ...@@ -88,4 +88,4 @@ For details, please refer to this [simple weight sharing example](https://github
[2]: https://arxiv.org/abs/1707.07012 [2]: https://arxiv.org/abs/1707.07012
[3]: https://arxiv.org/abs/1806.09055 [3]: https://arxiv.org/abs/1806.09055
[4]: https://arxiv.org/abs/1806.10282 [4]: https://arxiv.org/abs/1806.10282
[5]: https://arxiv.org/abs/1703.01041 [5]: https://arxiv.org/abs/1703.01041
...@@ -29,7 +29,7 @@ In NNI, there are mainly four types of annotation: ...@@ -29,7 +29,7 @@ In NNI, there are mainly four types of annotation:
**Arguments** **Arguments**
- **sampling_algo**: Sampling algorithm that specifies a search space. User should replace it with a built-in NNI sampling function whose name consists of an `nni.` identification and a search space type specified in [SearchSpaceSpec](SearchSpaceSpec.md) such as `choice` or `uniform`. - **sampling_algo**: Sampling algorithm that specifies a search space. User should replace it with a built-in NNI sampling function whose name consists of an `nni.` identification and a search space type specified in [SearchSpaceSpec](SearchSpaceSpec.md) such as `choice` or `uniform`.
- **name**: The name of the variable that the selected value will be assigned to. Note that this argument should be the same as the left value of the following assignment statement. - **name**: The name of the variable that the selected value will be assigned to. Note that this argument should be the same as the left value of the following assignment statement.
There are 10 types to express your search space as follows: There are 10 types to express your search space as follows:
......
...@@ -5,4 +5,4 @@ Batch Tuner on NNI ...@@ -5,4 +5,4 @@ Batch Tuner on NNI
Batch tuner allows users to simply provide several configurations (i.e., choices of hyper-parameters) for their trial code. After finishing all the configurations, the experiment is done. Batch tuner only supports the type choice in [search space spec](SearchSpaceSpec.md). Batch tuner allows users to simply provide several configurations (i.e., choices of hyper-parameters) for their trial code. After finishing all the configurations, the experiment is done. Batch tuner only supports the type choice in [search space spec](SearchSpaceSpec.md).
Suggested sceanrio: If the configurations you want to try have been decided, you can list them in searchspace file (using choice) and run them using batch tuner. Suggested scenario: If the configurations you want to try have been decided, you can list them in SearchSpace file (using choice) and run them using batch tuner.
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
NNI provides state-of-the-art tuning algorithm in our builtin-assessors and makes them easy to use. Below is the brief overview of NNI current builtin Assessors: NNI provides state-of-the-art tuning algorithm in our builtin-assessors and makes them easy to use. Below is the brief overview of NNI current builtin Assessors:
Note: Click the **Assessor's name** to get a detailed description of the algorithm, click the corresponding **Usage** to get the Assessor's installation requirements, suggested scenario and using example. Note: Click the **Assessor's name** to get the Assessor's installation requirements, suggested scenario and using example. The link for a detailed description of the algorithm is at the end of the suggested scenario of each Assessor.
Currently we support the following Assessors: Currently we support the following Assessors:
...@@ -25,7 +25,7 @@ Note: Please follow the format when you write your `config.yml` file. ...@@ -25,7 +25,7 @@ Note: Please follow the format when you write your `config.yml` file.
**Suggested scenario** **Suggested scenario**
It is applicable in a wide range of performance curves, thus, can be used in various scenarios to speed up the tuning progress. It is applicable in a wide range of performance curves, thus, can be used in various scenarios to speed up the tuning progress. [Detailed Description](./MedianstopAssessor.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -53,7 +53,7 @@ assessor: ...@@ -53,7 +53,7 @@ assessor:
**Suggested scenario** **Suggested scenario**
It is applicable in a wide range of performance curves, thus, can be used in various scenarios to speed up the tuning progress. Even better, it's able to handle and assess curves with similar performance. It is applicable in a wide range of performance curves, thus, can be used in various scenarios to speed up the tuning progress. Even better, it's able to handle and assess curves with similar performance. [Detailed Description](./CurvefittingAssessor.md)
**Requirement of classArg** **Requirement of classArg**
......
...@@ -2,7 +2,7 @@ ...@@ -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: 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](./CommunitySharings/HPOComparison.md) about the comparison of different Tuners on several problems. Note: Click the **Tuner's name** to get the Tuner's installation requirements, suggested scenario and using example. The link for a detailed description of the algorithm is at the end of the suggested scenario of each tuner. Here is an [article](./CommunitySharings/HpoComparision.md) about the comparison of different Tuners on several problems.
Currently we support the following algorithms: Currently we support the following algorithms:
...@@ -36,7 +36,8 @@ Note: Please follow the format when you write your `config.yml` file. Some built ...@@ -36,7 +36,8 @@ Note: Please follow the format when you write your `config.yml` file. Some built
**Suggested scenario** **Suggested scenario**
TPE, as a black-box optimization, can be used in various scenarios and shows good performance in general. Especially when you have limited computation resource and can only try a small number of trials. From a large amount of experiments, we could found that TPE is far better than Random Search. TPE, as a black-box optimization, can be used in various scenarios and shows good performance in general. Especially when you have limited computation resource and can only try a small number of trials. From a large amount of experiments, we could found that TPE is far better than Random Search. [Detailed Description](./HyperoptTuner.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -62,7 +63,7 @@ tuner: ...@@ -62,7 +63,7 @@ tuner:
**Suggested scenario** **Suggested scenario**
Random search is suggested when each trial does not take too long (e.g., each trial can be completed very soon, or early stopped by assessor quickly), and you have enough computation resource. Or you want to uniformly explore the search space. Random Search could be considered as baseline of search algorithm. Random search is suggested when each trial does not take too long (e.g., each trial can be completed very soon, or early stopped by assessor quickly), and you have enough computation resource. Or you want to uniformly explore the search space. Random Search could be considered as baseline of search algorithm. [Detailed Description](./HyperoptTuner.md)
**Requirement of classArg:** **Requirement of classArg:**
...@@ -86,7 +87,8 @@ tuner: ...@@ -86,7 +87,8 @@ tuner:
**Suggested scenario** **Suggested scenario**
Anneal is suggested when each trial does not take too long, and you have enough computation resource(almost same with Random Search). Or the variables in search space could be sample from some prior distribution. Anneal is suggested when each trial does not take too long, and you have enough computation resource(almost same with Random Search). Or the variables in search space could be sample from some prior distribution. [Detailed Description](./HyperoptTuner.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -112,7 +114,8 @@ tuner: ...@@ -112,7 +114,8 @@ tuner:
**Suggested scenario** **Suggested scenario**
Its requirement of computation resource is relatively high. Specifically, it requires large initial population to avoid falling into local optimum. If your trial is short or leverages assessor, this tuner is a good choice. And, it is more suggested when your trial code supports weight transfer, that is, the trial could inherit the converged weights from its parent(s). This can greatly speed up the training progress. Its requirement of computation resource is relatively high. Specifically, it requires large initial population to avoid falling into local optimum. If your trial is short or leverages assessor, this tuner is a good choice. And, it is more suggested when your trial code supports weight transfer, that is, the trial could inherit the converged weights from its parent(s). This can greatly speed up the training progress. [Detailed Description](./EvolutionTuner.md)
**Usage example** **Usage example**
...@@ -144,7 +147,7 @@ nnictl package install --name=SMAC ...@@ -144,7 +147,7 @@ nnictl package install --name=SMAC
**Suggested scenario** **Suggested scenario**
Similar to TPE, SMAC is also a black-box tuner which can be tried in various scenarios, and is suggested when computation resource is limited. It is optimized for discrete hyperparameters, thus, suggested when most of your hyperparameters are discrete. Similar to TPE, SMAC is also a black-box tuner which can be tried in various scenarios, and is suggested when computation resource is limited. It is optimized for discrete hyperparameters, thus, suggested when most of your hyperparameters are discrete. [Detailed Description](./SmacTuner.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -170,7 +173,7 @@ tuner: ...@@ -170,7 +173,7 @@ tuner:
**Suggested scenario** **Suggested scenario**
If the configurations you want to try have been decided, you can list them in searchspace file (using `choice`) and run them using batch tuner. If the configurations you want to try have been decided, you can list them in searchspace file (using `choice`) and run them using batch tuner. [Detailed Description](./BatchTuner.md)
**Usage example** **Usage example**
...@@ -192,8 +195,8 @@ Note that the search space that BatchTuner supported like: ...@@ -192,8 +195,8 @@ Note that the search space that BatchTuner supported like:
"_value" : [{"optimizer": "Adam", "learning_rate": 0.00001}, "_value" : [{"optimizer": "Adam", "learning_rate": 0.00001},
{"optimizer": "Adam", "learning_rate": 0.0001}, {"optimizer": "Adam", "learning_rate": 0.0001},
{"optimizer": "Adam", "learning_rate": 0.001}, {"optimizer": "Adam", "learning_rate": 0.001},
{"optimizer": "SGD", "learning_rate": 0.01}, {"optimizer": "SGD", "learning_rate": 0.01},
{"optimizer": "SGD", "learning_rate": 0.005}, {"optimizer": "SGD", "learning_rate": 0.005},
{"optimizer": "SGD", "learning_rate": 0.0002}] {"optimizer": "SGD", "learning_rate": 0.0002}]
} }
} }
...@@ -211,7 +214,7 @@ The search space file including the high-level key `combine_params`. The type of ...@@ -211,7 +214,7 @@ The search space file including the high-level key `combine_params`. The type of
Note that the only acceptable types of search space are `choice`, `quniform`, `qloguniform`. **The number `q` in `quniform` and `qloguniform` has special meaning (different from the spec in [search space spec](./SearchSpaceSpec.md)). It means the number of values that will be sampled evenly from the range `low` and `high`.** Note that the only acceptable types of search space are `choice`, `quniform`, `qloguniform`. **The number `q` in `quniform` and `qloguniform` has special meaning (different from the spec in [search space spec](./SearchSpaceSpec.md)). It means the number of values that will be sampled evenly from the range `low` and `high`.**
It is suggested when search space is small, it is feasible to exhaustively sweeping the whole search space. It is suggested when search space is small, it is feasible to exhaustively sweeping the whole search space. [Detailed Description](./GridsearchTuner.md)
**Usage example** **Usage example**
...@@ -231,7 +234,7 @@ tuner: ...@@ -231,7 +234,7 @@ tuner:
**Suggested scenario** **Suggested scenario**
It is suggested when you have limited computation resource but have relatively large search space. It performs well in the scenario that intermediate result (e.g., accuracy) can reflect good or bad of final result (e.g., accuracy) to some extent. It is suggested when you have limited computation resource but have relatively large search space. It performs well in the scenario that intermediate result (e.g., accuracy) can reflect good or bad of final result (e.g., accuracy) to some extent. [Detailed Description](./HyperbandAdvisor.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -265,7 +268,7 @@ NetworkMorphism requires [pyTorch](https://pytorch.org/get-started/locally), so ...@@ -265,7 +268,7 @@ NetworkMorphism requires [pyTorch](https://pytorch.org/get-started/locally), so
**Suggested scenario** **Suggested scenario**
It is suggested that you want to apply deep learning methods to your task (your own dataset) but you have no idea of how to choose or design a network. You modify the [example](https://github.com/Microsoft/nni/tree/master/examples/trials/network_morphism/cifar10/cifar10_keras.py) to fit your own dataset and your own data augmentation method. Also you can change the batch size, learning rate or optimizer. It is feasible for different tasks to find a good network architecture. Now this tuner only supports the computer vision domain. It is suggested that you want to apply deep learning methods to your task (your own dataset) but you have no idea of how to choose or design a network. You modify the [example](https://github.com/Microsoft/nni/tree/master/examples/trials/network_morphism/cifar10/cifar10_keras.py) to fit your own dataset and your own data augmentation method. Also you can change the batch size, learning rate or optimizer. It is feasible for different tasks to find a good network architecture. Now this tuner only supports the computer vision domain. [Detailed Description](./NetworkmorphismTuner.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -299,13 +302,9 @@ tuner: ...@@ -299,13 +302,9 @@ tuner:
Note that the only acceptable types of search space are `choice`, `quniform`, `uniform` and `randint`. Note that the only acceptable types of search space are `choice`, `quniform`, `uniform` and `randint`.
**Installation**
Metis Tuner requires [sklearn](https://scikit-learn.org/), so users should install it first. User could use `pip3 install sklearn` to install it.
**Suggested scenario** **Suggested scenario**
Similar to TPE and SMAC, Metis is a black-box tuner. If your system takes a long time to finish each trial, Metis is more favorable than other approaches such as random search. Furthermore, Metis provides guidance on the subsequent trial. Here is an [example](https://github.com/Microsoft/nni/tree/master/examples/trials/auto-gbdt/search_space_metis.json) about the use of Metis. User only need to send the final result like `accuracy` to tuner, by calling the nni SDK. Similar to TPE and SMAC, Metis is a black-box tuner. If your system takes a long time to finish each trial, Metis is more favorable than other approaches such as random search. Furthermore, Metis provides guidance on the subsequent trial. Here is an [example](https://github.com/Microsoft/nni/tree/master/examples/trials/auto-gbdt/search_space_metis.json) about the use of Metis. User only need to send the final result like `accuracy` to tuner, by calling the nni SDK. [Detailed Description](./MetisTuner.md)
**Requirement of classArg** **Requirement of classArg**
...@@ -339,7 +338,7 @@ nnictl package install --name=BOHB ...@@ -339,7 +338,7 @@ nnictl package install --name=BOHB
**Suggested scenario** **Suggested scenario**
Similar to Hyperband, it is suggested when you have limited computation resource but have relatively large search space. It performs well in the scenario that intermediate result (e.g., accuracy) can reflect good or bad of final result (e.g., accuracy) to some extent. In this case, it may converges to a better configuration due to bayesian optimization usage. Similar to Hyperband, it is suggested when you have limited computation resource but have relatively large search space. It performs well in the scenario that intermediate result (e.g., accuracy) can reflect good or bad of final result (e.g., accuracy) to some extent. In this case, it may converges to a better configuration due to bayesian optimization usage. [Detailed Description](./BohbAdvisor.md)
**Requirement of classArg** **Requirement of classArg**
......
...@@ -5,17 +5,17 @@ Comparison of Hyperparameter Optimization algorithms on several problems. ...@@ -5,17 +5,17 @@ Comparison of Hyperparameter Optimization algorithms on several problems.
Hyperparameter Optimization algorithms are list below: Hyperparameter Optimization algorithms are list below:
- [Random Search](../Builtin_Tuner.md#Random) - [Random Search](../BuiltinTuner.md)
- [Grid Search](../Builtin_Tuner.md#Random) - [Grid Search](../BuiltinTuner.md)
- [Evolution](../Builtin_Tuner.md#Evolution) - [Evolution](../BuiltinTuner.md)
- [Anneal](../Builtin_Tuner.md#Anneal) - [Anneal](../BuiltinTuner.md)
- [Metis](../Builtin_Tuner.md#MetisTuner) - [Metis](../BuiltinTuner.md)
- [TPE](../Builtin_Tuner.md#TPE) - [TPE](../BuiltinTuner.md)
- [SMAC](../Builtin_Tuner.md#SMAC) - [SMAC](../BuiltinTuner.md)
- [HyperBand](../Builtin_Tuner.md#Hyperband) - [HyperBand](../BuiltinTuner.md)
- [BOHB](../Builtin_Tuner.md#BOHB) - [BOHB](../BuiltinTuner.md)
All algorithms run in NNI local environment All algorithms run in NNI local environment.
Machine Environment: Machine Environment:
......
...@@ -28,7 +28,7 @@ To avoid over-fitting in **CIFAR-10**, we also compare the models in the other f ...@@ -28,7 +28,7 @@ To avoid over-fitting in **CIFAR-10**, we also compare the models in the other f
We do not change the default fine-tuning technique in their source code. In order to match each task, the codes of input image shape and output numbers are changed. We do not change the default fine-tuning technique in their source code. In order to match each task, the codes of input image shape and output numbers are changed.
Search phase time for all NAS methods is **two days** as well as the retrain time. Average results are reported based on **three repeat times**. Our evaluation machines have one Nvidia Tesla P100 GPU, 112GB of RAM and one 2.60GHz CPU (Intel E5-2690). Search phase time for all NAS methods is **two days** as well as the retrain time. Average results are reported based on **three repeat times**. Our evaluation machines have one Nvidia Tesla P100 GPU, 112GB of RAM and one 2.60GHz CPU (Intel E5-2690).
...@@ -57,7 +57,7 @@ The best or average results reported in the paper: ...@@ -57,7 +57,7 @@ The best or average results reported in the paper:
For AutoKeras, it has relatively worse performance across all datasets due to its random factor on network morphism. For AutoKeras, it has relatively worse performance across all datasets due to its random factor on network morphism.
For ENAS, ENAS (macro) shows good results in OUI-Adience-Age and ENAS (micro) shows good results in CIFAR-10. For ENAS, ENAS (macro) shows good results in OUI-Adience-Age and ENAS (micro) shows good results in CIFAR-10.
For DARTS, it has a good performance on some datasets but we found its high variance in other datasets. The difference among three runs of benchmarks can be up to 5.37% in OUI-Adience-Age and 4.36% in ImageNet-10-1. For DARTS, it has a good performance on some datasets but we found its high variance in other datasets. The difference among three runs of benchmarks can be up to 5.37% in OUI-Adience-Age and 4.36% in ImageNet-10-1.
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
In this tutorial, we first introduce a github repo [Recommenders](https://github.com/Microsoft/Recommenders). It is a repository that provides examples and best practices for building recommendation systems, provided as Jupyter notebooks. It has various models that are popular and widely deployed in recommendation systems. To provide a complete end-to-end experience, they present each example in five key tasks, as shown below: In this tutorial, we first introduce a github repo [Recommenders](https://github.com/Microsoft/Recommenders). It is a repository that provides examples and best practices for building recommendation systems, provided as Jupyter notebooks. It has various models that are popular and widely deployed in recommendation systems. To provide a complete end-to-end experience, they present each example in five key tasks, as shown below:
- [Prepare Data](https://github.com/Microsoft/Recommenders/blob/master/notebooks/01_prepare_data/README.md): Preparing and loading data for each recommender algorithm - [Prepare Data](https://github.com/Microsoft/Recommenders/blob/master/notebooks/01_prepare_data/README.md): Preparing and loading data for each recommender algorithm.
- [Model](https://github.com/Microsoft/Recommenders/blob/master/notebooks/02_model/README.md): Building models using various classical and deep learning recommender algorithms such as Alternating Least Squares ([ALS](https://spark.apache.org/docs/latest/api/python/_modules/pyspark/ml/recommendation.html#ALS)) or eXtreme Deep Factorization Machines ([xDeepFM](https://arxiv.org/abs/1803.05170)). - [Model](https://github.com/Microsoft/Recommenders/blob/master/notebooks/02_model/README.md): Building models using various classical and deep learning recommender algorithms such as Alternating Least Squares ([ALS](https://spark.apache.org/docs/latest/api/python/_modules/pyspark/ml/recommendation.html#ALS)) or eXtreme Deep Factorization Machines ([xDeepFM](https://arxiv.org/abs/1803.05170)).
- [Evaluate](https://github.com/Microsoft/Recommenders/blob/master/notebooks/03_evaluate/README.md): Evaluating algorithms with offline metrics - [Evaluate](https://github.com/Microsoft/Recommenders/blob/master/notebooks/03_evaluate/README.md): Evaluating algorithms with offline metrics.
- [Model Select and Optimize](https://github.com/Microsoft/Recommenders/blob/master/notebooks/04_model_select_and_optimize/README.md): Tuning and optimizing hyperparameters for recommender models - [Model Select and Optimize](https://github.com/Microsoft/Recommenders/blob/master/notebooks/04_model_select_and_optimize/README.md): Tuning and optimizing hyperparameters for recommender models.
- [Operationalize](https://github.com/Microsoft/Recommenders/blob/master/notebooks/05_operationalize/README.md): Operationalizing models in a production environment on Azure - [Operationalize](https://github.com/Microsoft/Recommenders/blob/master/notebooks/05_operationalize/README.md): Operationalizing models in a production environment on Azure.
The fourth task is tuning and optimizing the model's hyperparametrs, this is where NNI could help. To give a concrete example that NNI tunes the models in Recommenders, let's demonstrate with the model [SVD](https://github.com/Microsoft/Recommenders/blob/master/notebooks/02_model/surprise_svd_deep_dive.ipynb), and data Movielens100k. There are more than 10 hyperparameters to be tuned in this model. The fourth task is tuning and optimizing the model's hyperparameters, this is where NNI could help. To give a concrete example that NNI tunes the models in Recommenders, let's demonstrate with the model [SVD](https://github.com/Microsoft/Recommenders/blob/master/notebooks/02_model/surprise_svd_deep_dive.ipynb), and data Movielens100k. There are more than 10 hyperparameters to be tuned in this model.
[This Jupyter notebook](https://github.com/Microsoft/Recommenders/blob/master/notebooks/04_model_select_and_optimize/nni_surprise_svd.ipynb) provided by Recommenders is a very detailed step-by-step tutorial for this example. It uses different built-in tuning algorithms in NNI, including `Annealing`, `SMAC`, `Random Search`, `TPE`, `Hyperband`, `Metis` and `Evolution`. Finally, the results of different tuning algorithms are compared. Please go through this notebook to learn how to use NNI to tune SVD model, then you could further use NNI to tune other models in Recommenders. [This Jupyter notebook](https://github.com/Microsoft/Recommenders/blob/master/notebooks/04_model_select_and_optimize/nni_surprise_svd.ipynb) provided by Recommenders is a very detailed step-by-step tutorial for this example. It uses different built-in tuning algorithms in NNI, including `Annealing`, `SMAC`, `Random Search`, `TPE`, `Hyperband`, `Metis` and `Evolution`. Finally, the results of different tuning algorithms are compared. Please go through this notebook to learn how to use NNI to tune SVD model, then you could further use NNI to tune other models in Recommenders.
\ No newline at end of file
...@@ -8,7 +8,7 @@ However, for those individuals who want a bit more guidance on the best way to c ...@@ -8,7 +8,7 @@ However, for those individuals who want a bit more guidance on the best way to c
Looking for a quickstart, get acquainted with our [Get Started](./QuickStart.md) guide. Looking for a quickstart, get acquainted with our [Get Started](./QuickStart.md) guide.
There are a few simple guidelines that you need to follow before providing your hacks. There are a few simple guidelines that you need to follow before providing your hacks.
## Raising Issues ## Raising Issues
...@@ -20,9 +20,9 @@ When raising issues, please specify the following: ...@@ -20,9 +20,9 @@ When raising issues, please specify the following:
## Submit Proposals for New Features ## Submit Proposals for New Features
- There is always something more that is required, to make it easier to suit your use-cases. Feel free to join the discussion on new features or raise a PR with your proposed change. - There is always something more that is required, to make it easier to suit your use-cases. Feel free to join the discussion on new features or raise a PR with your proposed change.
- Fork the repository under your own github handle. After cloning the repository. Add, commit, push and sqaush (if necessary) the changes with detailed commit messages to your fork. From where you can proceed to making a pull request. - Fork the repository under your own github handle. After cloning the repository. Add, commit, push and sqaush (if necessary) the changes with detailed commit messages to your fork. From where you can proceed to making a pull request.
## Contributing to Source Code and Bug Fixes ## Contributing to Source Code and Bug Fixes
...@@ -33,15 +33,15 @@ If you are looking for How to develop and debug the NNI source code, you can ref ...@@ -33,15 +33,15 @@ If you are looking for How to develop and debug the NNI source code, you can ref
Similarly for [Quick Start](QuickStart.md). For everything else, refer to [NNI Home page](http://nni.readthedocs.io). Similarly for [Quick Start](QuickStart.md). For everything else, refer to [NNI Home page](http://nni.readthedocs.io).
## Solve Existing Issues ## Solve Existing Issues
Head over to [issues](https://github.com/Microsoft/nni/issues) to find issues where help is needed from contributors. You can find issues tagged with 'good-first-issue' or 'help-wanted' to contribute in. Head over to [issues](https://github.com/Microsoft/nni/issues) to find issues where help is needed from contributors. You can find issues tagged with 'good-first-issue' or 'help-wanted' to contribute in.
A person looking to contribute can take up an issue by claiming it as a comment/assign their Github ID to it. In case there is no PR or update in progress for a week on the said issue, then the issue reopens for anyone to take up again. We need to consider high priority issues/regressions where response time must be a day or so. A person looking to contribute can take up an issue by claiming it as a comment/assign their Github ID to it. In case there is no PR or update in progress for a week on the said issue, then the issue reopens for anyone to take up again. We need to consider high priority issues/regressions where response time must be a day or so.
## Code Styles & Naming Conventions ## Code Styles & Naming Conventions
* We follow [PEP8](https://www.python.org/dev/peps/pep-0008/) for Python code and naming conventions, do try to adhere to the same when making a pull request or making a change. One can also take the help of linters such as `flake8` or `pylint` * We follow [PEP8](https://www.python.org/dev/peps/pep-0008/) for Python code and naming conventions, do try to adhere to the same when making a pull request or making a change. One can also take the help of linters such as `flake8` or `pylint`
* We also follow [NumPy Docstring Style](https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy) for Python Docstring Conventions. During the [documentation building](Contributing.md#documentation), we use [sphinx.ext.napoleon](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html) to generate Python API documentation from Docstring. * We also follow [NumPy Docstring Style](https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy) for Python Docstring Conventions. During the [documentation building](Contributing.md#documentation), we use [sphinx.ext.napoleon](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html) to generate Python API documentation from Docstring.
## Documentation ## Documentation
Our documentation is built with [sphinx](http://sphinx-doc.org/), supporting [Markdown](https://guides.github.com/features/mastering-markdown/) and [reStructuredText](http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) format. All our documentations are placed under [docs/en_US](https://github.com/Microsoft/nni/tree/master/docs). Our documentation is built with [sphinx](http://sphinx-doc.org/), supporting [Markdown](https://guides.github.com/features/mastering-markdown/) and [reStructuredText](http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) format. All our documentations are placed under [docs/en_US](https://github.com/Microsoft/nni/tree/master/docs).
* Before submitting the documentation change, please __build homepage locally__: `cd docs/en_US && make html`, then you can see all the built documentation webpage under the folder `docs/en_US/_build/html`. It's also highly recommended taking care of __every WARNING__ during the build, which is very likely the signal of a __deadlink__ and other annoying issues. * Before submitting the documentation change, please __build homepage locally__: `cd docs/en_US && make html`, then you can see all the built documentation webpage under the folder `docs/en_US/_build/html`. It's also highly recommended taking care of __every WARNING__ during the build, which is very likely the signal of a __deadlink__ and other annoying issues.
......
...@@ -2,7 +2,7 @@ Curve Fitting Assessor on NNI ...@@ -2,7 +2,7 @@ Curve Fitting Assessor on NNI
=== ===
## 1. Introduction ## 1. Introduction
Curve Fitting Assessor is a LPA(learning, predicting, assessing) algorithm. It stops a pending trial X at step S if the prediction of final epoch's performance is worse than the best final performance in the trial history. Curve Fitting Assessor is a LPA(learning, predicting, assessing) algorithm. It stops a pending trial X at step S if the prediction of final epoch's performance is worse than the best final performance in the trial history.
In this algorithm, we use 12 curves to fit the learning curve, the large set of parametric curve models are chosen from [reference paper][1]. The learning curves' shape coincides with our prior knowlwdge about the form of learning curves: They are typically increasing, saturating functions. In this algorithm, we use 12 curves to fit the learning curve, the large set of parametric curve models are chosen from [reference paper][1]. The learning curves' shape coincides with our prior knowlwdge about the form of learning curves: They are typically increasing, saturating functions.
......
...@@ -34,7 +34,7 @@ advisor: ...@@ -34,7 +34,7 @@ advisor:
classFileName: my_customized_advisor.py classFileName: my_customized_advisor.py
className: CustomizedAdvisor className: CustomizedAdvisor
# Any parameter need to pass to your advisor class __init__ constructor # Any parameter need to pass to your advisor class __init__ constructor
# can be specified in this optional classArgs field, for example # can be specified in this optional classArgs field, for example
classArgs: classArgs:
arg1: value1 arg1: value1
``` ```
...@@ -47,7 +47,7 @@ assessor: ...@@ -47,7 +47,7 @@ assessor:
classFileName: my_customized_assessor.py classFileName: my_customized_assessor.py
className: CustomizedAssessor className: CustomizedAssessor
# Any parameter need to pass to your Assessor class __init__ constructor # Any parameter need to pass to your Assessor class __init__ constructor
# can be specified in this optional classArgs field, for example # can be specified in this optional classArgs field, for example
classArgs: classArgs:
arg1: value1 arg1: value1
``` ```
......
...@@ -96,7 +96,7 @@ tuner: ...@@ -96,7 +96,7 @@ tuner:
classFileName: my_customized_tuner.py classFileName: my_customized_tuner.py
className: CustomizedTuner className: CustomizedTuner
# Any parameter need to pass to your tuner class __init__ constructor # Any parameter need to pass to your tuner class __init__ constructor
# can be specified in this optional classArgs field, for example # can be specified in this optional classArgs field, for example
classArgs: classArgs:
arg1: value1 arg1: value1
......
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