Skip to content

Commit

Permalink
Merge pull request #31 from microsoft/master
Browse files Browse the repository at this point in the history
pull code
  • Loading branch information
chicm-ms authored Aug 6, 2019
2 parents f322548 + 1fee166 commit 3a45961
Show file tree
Hide file tree
Showing 245 changed files with 5,380 additions and 1,922 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ dev-install-python-modules:
#$(_INFO) Installing Python SDK $(_END)
mkdir -p build
ln -sf ../src/sdk/pynni/nni build/nni
ln -sf ../src/sdk/pynni/nnicli build/nnicli
ln -sf ../tools/nni_annotation build/nni_annotation
ln -sf ../tools/nni_cmd build/nni_cmd
ln -sf ../tools/nni_trial_tool build/nni_trial_tool
Expand Down
154 changes: 93 additions & 61 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包。 它通过多种调优的算法来搜索最好的神经网络结构和(或)超参,并支持单机、本地多机、云等不同的运行环境。

### **NNI [v0.9](https://github.com/Microsoft/nni/releases) 已发布!**
### **NNI [v0.9](https://github.com/Microsoft/nni/releases) 已发布! &nbsp;[<img width="48" src="docs/img/release_icon.png" />](#nni-released-reminder)**

<p align="center">
<a href="#nni-v05-has-been-released"><img src="docs/img/overview.svg" /></a>
<a href="#nni-has-been-released"><img src="docs/img/overview.svg" /></a>
</p>

<table>
Expand All @@ -28,11 +28,11 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包
<img src="docs/img/bar.png"/>
</td>
<td>
<b>训练服务</b>
<b>训练平台</b>
<img src="docs/img/bar.png"/>
</td>
</tr>
<tr/>
</tr>
<tr valign="top">
<td>
<ul>
Expand All @@ -46,39 +46,45 @@ NNI (Neural Network Intelligence) 是自动机器学习(AutoML)的工具包
<li>Theano</li>
</ul>
</td>
<td>
<a href="docs/zh_CN/BuiltinTuner.md">Tuner(调参器)</a>
<ul>
<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#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#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/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#GPTuner">GP Tuner</a></li>
</ul>
<a href="docs/zh_CN/BuiltinAssessor.md">Assessor(评估器)</a>
<td align="left">
<a href="docs/en_US/Tuner/BuiltinTuner.md">Tuner(调参器)</a>
<br />
<ul>
<li><a href="docs/zh_CN/BuiltinAssessor.md#Medianstop">Median Stop</a></li>
<li><a href="docs/zh_CN/BuiltinAssessor.md#Curvefitting">Curve Fitting</a></li>
</ul>
<b style="margin-left:-20px">通用 Tuner</b>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#Random">Random Search(随机搜索)</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#Evolution">Naïve Evolution(进化算法)</a></li>
<b style="margin-left:-20px">超参 Tuner</b>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#TPE">TPE</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#Anneal">Anneal(退火算法)</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#SMAC">SMAC</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#Batch">Batch(批处理)</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#GridSearch">Grid Search(遍历搜索)</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#Hyperband">Hyperband</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#MetisTuner">Metis Tuner</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#BOHB">BOHB</a></li>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#GPTuner">GP Tuner</a></li>
<b style="margin-left:-20px">网络结构 Tuner</b>
<li><a href="docs/en_US/Tuner/BuiltinTuner.md#NetworkMorphism">Network Morphism</a></li>
<li><a href="examples/tuners/enas_nni/README.md">ENAS</a></li>
</ul>
<a href="docs/en_US/Assessor/BuiltinAssessor.md">Assessor(评估器)</a>
<ul>
<li><a href="docs/en_US/Assessor/BuiltinAssessor.md#Medianstop">Median Stop(中位数终止)</a></li>
<li><a href="docs/en_US/Assessor/BuiltinAssessor.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/KubeflowMode.md">Kubeflow</a></li>
<li><a href="docs/zh_CN/FrameworkControllerMode.md">基于 Kubernetes(AKS 等等)的 FrameworkController</a></li>
<li><a href="docs/en_US/TrainingService/LocalMode.md">本机</a></li>
<li><a href="docs/en_US/TrainingService/RemoteMachineMode.md">远程计算机</a></li>
<li><b>基于 Kubernetes 的平台</b></li>
<ul><li><a href="docs/en_US/TrainingService/PaiMode.md">OpenPAI</a></li>
<li><a href="docs/en_US/TrainingService/KubeflowMode.md">Kubeflow</a></li>
<li><a href="docs/en_US/TrainingService/FrameworkControllerMode.md">基于 Kubernetes(AKS 等)的 FrameworkController</a></li>
</ul>
</ul>
</td>
</tr>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -122,7 +128,7 @@ python -m pip install --upgrade nni

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

**通过源代码安装**

Expand All @@ -133,7 +139,7 @@ Linux 和 macOS
*`python >= 3.5` 的环境中运行命令: `git``wget`,确保安装了这两个组件。

```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git
git clone -b v0.9 https://github.com/Microsoft/nni.git
cd nni
source install.sh
```
Expand All @@ -143,14 +149,14 @@ Windows
*`python >=3.5` 的环境中运行命令: `git``PowerShell`,确保安装了这两个组件。

```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git
git clone -b v0.9 https://github.com/Microsoft/nni.git
cd nni
powershell -ExecutionPolicy Bypass -file install.ps1
```

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

Windows 上参考 [Windows 上使用 NNI](docs/zh_CN/NniOnWindows.md)
Windows 上参考 [Windows 上使用 NNI](docs/zh_CN/Tutorial/NniOnWindows.md)

**验证安装**

Expand All @@ -159,7 +165,7 @@ Windows 上参考 [Windows 上使用 NNI](docs/zh_CN/NniOnWindows.md)。
* 通过克隆源代码下载示例。

```bash
git clone -b v0.8 https://github.com/Microsoft/nni.git
git clone -b v0.9 https://github.com/Microsoft/nni.git
```

Linux 和 macOS
Expand Down Expand Up @@ -207,7 +213,7 @@ You can use these commands to get more information about the experiment
-----------------------------------------------------------------------
```

* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](docs/zh_CN/WebUI.md)的更多页面。
* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](docs/zh_CN/Tutorial/WebUI.md)的更多页面。

<table style="border: none">
<th><img src="./docs/img/webui_overview_page.png" alt="drawing" width="395"/></th>
Expand All @@ -216,43 +222,69 @@ You can use these commands to get more information about the experiment

## **文档**

主要文档都可以在[这里](https://nni.readthedocs.io/cn/latest/Overview.html)找到,文档均从本代码库生成。
点击阅读:

* [NNI 概述](docs/zh_CN/Overview.md)
* [快速入门](docs/zh_CN/QuickStart.md)
* [快速入门](docs/en_US/Tutorial/QuickStart.md)
* [贡献](docs/en_US/Tutorial/Contributing.md)
* [示例](docs/en_US/examples.rst)
* [参考](docs/en_US/reference.rst)
* [Web 界面教程](docs/en_US/Tutorial/WebUI.md)

## **入门**

* [安装 NNI](docs/zh_CN/Installation.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/BuiltinTuner.md)
* [配置 Experiment](docs/zh_CN/ExperimentConfig.md)
* [如何使用 Annotation](docs/zh_CN/Trials.md#nni-python-annotation)
* [安装 NNI](docs/en_US/Tutorial/Installation.md)
* [使用命令行工具 nnictl](docs/en_US/Tutorial/Nnictl.md)
* [使用 NNIBoard](docs/en_US/Tutorial/WebUI.md)
* [如何定义搜索空间](docs/en_US/Tutorial/SearchSpaceSpec.md)
* [如何实现 Trial 代码](docs/en_US/TrialExample/Trials.md)
* [如何选择 Tuner、搜索算法](docs/en_US/Tuner/BuiltinTuner.md)
* [配置 Experiment](docs/en_US/Tutorial/ExperimentConfig.md)
* [如何使用 Annotation](docs/en_US/TrialExample/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)
* [在 Kubeflow 上运行 Experiment](docs/zh_CN/KubeflowMode.md)
* [尝试不同的 Tuner](docs/zh_CN/tuners.rst)
* [尝试不同的 Assessor](docs/zh_CN/assessors.rst)
* [实现自定义 Tuner](docs/zh_CN/CustomizeTuner.md)
* [实现自定义 Assessor](docs/zh_CN/CustomizeAssessor.md)
* [使用进化算法为阅读理解任务找到好模型](examples/trials/ga_squad/README_zh_CN.md)
* [在 OpenPAI 上运行 Experiment](docs/en_US/TrainingService/PaiMode.md)
* [在 Kubeflow 上运行 Experiment](docs/en_US/TrainingService/KubeflowMode.md)
* [在本机运行 Experiment (支持多 GPU 卡)](docs/en_US/TrainingService/LocalMode.md)
* [在多机上运行 Experiment](docs/en_US/TrainingService/RemoteMachineMode.md)
* [尝试不同的 Tuner](docs/en_US/Tuner/BuiltinTuner.md)
* [尝试不同的 Assessor](docs/en_US/Assessor/BuiltinAssessor.md)
* [实现自定义 Tuner](docs/en_US/Tuner/CustomizeTuner.md)
* [实现自定义 Assessor](docs/en_US/Assessor/CustomizeAssessor.md)
* [使用进化算法为阅读理解任务找到好模型](docs/en_US/TrialExample/SquadEvolutionExamples.md)

## **贡献**

欢迎贡献代码或提交建议,可在 [GitHub issues](https://github.com/Microsoft/nni/issues) 跟踪需求和 Bug。
非常欢迎通过各种方式参与此项目,例如:

* 审查[源代码改动](https://github.com/microsoft/nni/pulls)
* 审查[文档](https://github.com/microsoft/nni/tree/master/docs)中从拼写错误到新内容的任何内容,并提交拉取请求。
* 找到标有 ['good first issue'](https://github.com/Microsoft/nni/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)['help-wanted'](https://github.com/microsoft/nni/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) 标签的 Issue。这些都是简单的 Issue,新的贡献者可以从这些问题开始。

在提交代码前,需要遵循以下的简单准则:

* [如何调试](docs/en_US/Tutorial/HowToDebug.md)
* [代码风格和命名约定](docs/en_US/Tutorial/Contributing.md)
* 如何设置 [NNI 开发环境](docs/zh_CN/Tutorial/SetupNniDeveloperEnvironment.md)
* 查看[贡献说明](docs/en_US/Tutorial/Contributing.md)并熟悉 NNI 的代码贡献指南

## **外部代码库**

推荐新贡献者从标有 **good first issue** 的简单需求开始。
下面是一些贡献者为 NNI 提供的使用示例 谢谢可爱的贡献者! 欢迎越来越多的人加入我们!

如要安装 NNI 开发环境,参考:[配置 NNI 开发环境](docs/zh_CN/SetupNniDeveloperEnvironment.md)
* 在 NNI 中运行 [ENAS](examples/tuners/enas_nni/README_zh_CN.md)
* 在 NNI 中运行 [神经网络架构结构搜索](examples/trials/nas_cifar10/README_zh_CN.md)

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

我们正在编写[如何调试](docs/zh_CN/HowToDebug.md) 的页面,欢迎提交建议和问题。
* [报告 Bug](https://github.com/microsoft/nni/issues/new/choose)

* [请求新功能](https://github.com/microsoft/nni/issues/new/choose).
*[Gitter](https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 中参与讨论
*[Stack Overflow](https://stackoverflow.com/questions/tagged/nni?sort=Newest&edited=true) 上使用 nni 的标签提问,或[在 Github 上提交 Issue](https://github.com/microsoft/nni/issues/new/choose)
* 我们正在实现[如何调试](docs/zh_CN/Tutorial/HowToDebug.md)的页面,欢迎提交建议和问题。

## **许可协议**

Expand Down
10 changes: 9 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
displayName: 'Install nni toolkit via source code'
- script: |
python3 -m pip install flake8 --user
IGNORE=./tools/nni_annotation/testcase/*:F821,./examples/trials/mnist-nas/mnist.py:F821
IGNORE=./tools/nni_annotation/testcase/*:F821,./examples/trials/mnist-nas/*/mnist*.py:F821
python3 -m flake8 . --count --per-file-ignores=$IGNORE --select=E9,F63,F72,F82 --show-source --statistics
displayName: 'Run flake8 tests to find Python syntax errors and undefined names'
- script: |
Expand All @@ -34,6 +34,10 @@ jobs:
cd test
PATH=$HOME/.local/bin:$PATH python3 metrics_test.py
displayName: 'Trial job metrics test'
- script: |
cd test
PATH=$HOME/.local/bin:$PATH python3 cli_test.py
displayName: 'nnicli test'
- job: 'basic_test_pr_macOS'
pool:
Expand Down Expand Up @@ -61,3 +65,7 @@ jobs:
cd test
PATH=$HOME/Library/Python/3.7/bin:$PATH python3 tuner_test.py
displayName: 'Built-in tuners / assessors tests'
- script: |
cd test
PATH=$HOME/Library/Python/3.7/bin:$PATH python3 cli_test.py
displayName: 'nnicli test'
12 changes: 12 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
files:
- source: '/**/*.[mM][dD]'
ignore:
- '*_%locale_with_underscore%.md'
- /docs
- /%locale_with_underscore%
- '**/ISSUE_TEMPLATE/**'
translation: /%original_path%/%file_name%_%locale_with_underscore%.md
- source: /docs/en_US/**/*
ignore:
- /docs/%locale_with_underscore%/**/*.*
translation: /docs/%locale_with_underscore%/**/%original_file_name%
1 change: 1 addition & 0 deletions deployment/pypi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ 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/nni_manager/config $(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
Expand Down
7 changes: 5 additions & 2 deletions deployment/pypi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@
long_description_content_type = 'text/markdown',
license = 'MIT',
url = 'https://github.com/Microsoft/nni',
packages = setuptools.find_packages('../../tools') + setuptools.find_packages('../../src/sdk/pynni', exclude=['tests']),
packages = setuptools.find_packages('../../tools') \
+ setuptools.find_packages('../../src/sdk/pynni', exclude=['tests']) \
+ setuptools.find_packages('../../src/sdk/pycli'),
package_dir = {
'nni_annotation': '../../tools/nni_annotation',
'nni_cmd': '../../tools/nni_cmd',
'nni_trial_tool': '../../tools/nni_trial_tool',
'nni_gpu_tool': '../../tools/nni_gpu_tool',
'nni': '../../src/sdk/pynni/nni'
'nni': '../../src/sdk/pynni/nni',
'nnicli': '../../src/sdk/pycli/nnicli'
},
package_data = {'nni': ['**/requirements.txt']},
python_requires = '>=3.5',
Expand Down
Loading

0 comments on commit 3a45961

Please sign in to comment.