Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master #290

Merged
merged 11 commits into from
Mar 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ RUN python3 -m pip --no-cache-dir install torch==1.4.0
RUN python3 -m pip install torchvision==0.5.0

#
# sklearn 0.23.2
# sklearn 0.24.1
#
RUN python3 -m pip --no-cache-dir install scikit-learn==0.23.2
RUN python3 -m pip --no-cache-dir install scikit-learn==0.24.1

#
# pandas==0.23.4 lightgbm==2.2.2
Expand Down
91 changes: 32 additions & 59 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

[![MIT 许可证](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE) [![生成状态](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/full%20test%20-%20linux?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=62&branchName=master) [![问题](https://img.shields.io/github/issues-raw/Microsoft/nni.svg)](https://github.com/Microsoft/nni/issues?q=is%3Aissue+is%3Aopen) [![Bug](https://img.shields.io/github/issues/Microsoft/nni/bug.svg)](https://github.com/Microsoft/nni/issues?q=is%3Aissue+is%3Aopen+label%3Abug) [![拉取请求](https://img.shields.io/github/issues-pr-raw/Microsoft/nni.svg)](https://github.com/Microsoft/nni/pulls?q=is%3Apr+is%3Aopen) [![版本](https://img.shields.io/github/release/Microsoft/nni.svg)](https://github.com/Microsoft/nni/releases) [![进入 https://gitter.im/Microsoft/nni 聊天室提问](https://badges.gitter.im/Microsoft/nni.svg)](https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![文档状态](https://readthedocs.org/projects/nni/badge/?version=latest)](https://nni.readthedocs.io/zh/latest/?badge=latest)

[English](README.md)
[NNI 文档](https://nni.readthedocs.io/zh/stable/) | [English](README.md)

**NNI (Neural Network Intelligence)** 是一个轻量但强大的工具包,帮助用户**自动**的进行[特征工程](docs/zh_CN/FeatureEngineering/Overview.rst),[神经网络架构搜索](docs/zh_CN/NAS/Overview.rst),[超参调优](docs/zh_CN/Tuner/BuiltinTuner.rst)以及[模型压缩](docs/zh_CN/Compression/Overview.rst)。

NNI 管理自动机器学习 (AutoML) 的 Experiment,**调度运行**由调优算法生成的 Trial 任务来找到最好的神经网络架构和/或超参,支持**各种训练环境**,如[本机](docs/zh_CN/TrainingService/LocalMode.rst),[远程服务器](docs/zh_CN/TrainingService/RemoteMachineMode.rst),[OpenPAI](docs/zh_CN/TrainingService/PaiMode.rst),[Kubeflow](docs/zh_CN/TrainingService/KubeflowMode.rst),[基于 K8S 的 FrameworkController(如,AKS 等)](docs/zh_CN/TrainingService/FrameworkControllerMode.rst), [DLWorkspace (又称 DLTS)](docs/zh_CN/TrainingService/DLTSMode.rst), [AML (Azure Machine Learning)](docs/zh_CN/TrainingService/AMLMode.rst), [AdaptDL(又称 ADL)](docs/zh_CN/TrainingService/AdaptDLMode.rst) 和其他云服务
NNI 管理自动机器学习 (AutoML) 的 Experiment,**调度运行**由调优算法生成的 Trial 任务来找到最好的神经网络架构和/或超参,支持**各种训练环境**,如[本机](docs/zh_CN/TrainingService/LocalMode.rst),[远程服务器](docs/zh_CN/TrainingService/RemoteMachineMode.rst),[OpenPAI](docs/zh_CN/TrainingService/PaiMode.rst),[Kubeflow](docs/zh_CN/TrainingService/KubeflowMode.rst),[基于 K8S 的 FrameworkController(如,AKS 等)](docs/zh_CN/TrainingService/FrameworkControllerMode.rst), [DLWorkspace (又称 DLTS)](docs/zh_CN/TrainingService/DLTSMode.rst), [AML (Azure Machine Learning)](docs/zh_CN/TrainingService/AMLMode.rst), [AdaptDL(又称 ADL)](docs/zh_CN/TrainingService/AdaptDLMode.rst) ,和其他的云平台甚至 [混合模式](docs/zh_CN/TrainingService/HybridMode.rst)

## **使用场景**

Expand All @@ -19,7 +19,12 @@ NNI 管理自动机器学习 (AutoML) 的 Experiment,**调度运行**由调优
* 想要更容易**实现或试验新的自动机器学习算法**的研究员或数据科学家,包括:超参调优算法,神经网络搜索算法以及模型压缩算法。
* 在机器学习平台中**支持自动机器学习**。

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

* **最新版本**:[v2.0 已发布](https://github.com/microsoft/nni/releases) - *2021年1月14日*
* **最新视频 demo**:[Youtube 入口](https://www.youtube.com/channel/UCKcafm6861B2mnYhPbZHavw) | [Bilibili 入口](https://space.bilibili.com/1649051673) - *上次更新:2021年2月19日*

* **最新案例分享**:[利用 AdaptDL 和 NNI 集成方案实现经济高效超参调优](https://medium.com/casl-project/cost-effective-hyper-parameter-tuning-using-adaptdl-with-nni-e55642888761) - *2021年2月23日发布*

## **NNI 功能一览**

Expand Down Expand Up @@ -165,6 +170,7 @@ NNI 提供命令行工具以及友好的 WebUI 来管理训练的 Experiment。
<ul>
<li><a href="docs/zh_CN/TrainingService/LocalMode.rst">本机</a></li>
<li><a href="docs/zh_CN/TrainingService/RemoteMachineMode.rst">远程计算机</a></li>
<li><a href="docs/zh_CN/TrainingService/HybridMode.rst">混合模式</a></li>
<li><a href="docs/zh_CN/TrainingService/AMLMode.rst">AML(Azure Machine Learning)</a></li>
<li><b>基于 Kubernetes 的平台</b></li>
<ul>
Expand Down Expand Up @@ -238,27 +244,25 @@ Linux 和 macOS 下 NNI 系统需求[参考这里](https://nni.readthedocs.io/zh

### **验证安装**

以下示例基于 TensorFlow 1.x 。确保运行环境中使用的的是 ** TensorFlow 1.x**。

* 通过克隆源代码下载示例。

```bash
git clone -b v1.9 https://github.com/Microsoft/nni.git
```
```bash
git clone -b v2.0 https://github.com/Microsoft/nni.git
```

* 运行 MNIST 示例。

Linux 或 macOS

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

Windows

```bash
nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml
```
Linux 或 macOS
```bash
nnictl create --config nni/examples/trials/mnist-pytorch/config.yml
```
Windows
```powershell
nnictl create --config nni\examples\trials\mnist-pytorch\config_windows.yml
```

* 在命令行中等待输出 `INFO: Successfully started experiment!`。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。

Expand Down Expand Up @@ -296,54 +300,23 @@ You can use these commands to get more information about the experiment
<th><img src="./docs/img/webui-img/full-detail.png" alt="drawing" width="410" height="300"/></th>
</table>

## **文档**

* 要了解 NNI,请阅读 [NNI 概述](https://nni.readthedocs.io/zh/latest/Overview.html)。
* 要熟悉如何使用 NNI,请阅读[文档](https://nni.readthedocs.io/zh/latest/index.html)。
* 要安装并使用 NNI,参考[安装指南](https://nni.readthedocs.io/zh/latest/installation.html)。

## **贡献**

本项目欢迎任何贡献和建议。 大多数贡献都需要你同意参与者许可协议(CLA),来声明你有权,并实际上授予我们有权使用你的贡献。 有关详细信息,请访问 https://cla.microsoft.com。

当你提交拉取请求时,CLA机器人会自动检查你是否需要提供CLA,并修饰这个拉取请求(例如,标签、注释)。 只需要按照机器人提供的说明进行操作即可。 CLA 只需要同意一次,就能应用到所有的代码仓库上。
## **发布和贡献**

该项目采用了 [ Microsoft 开源行为准则 ](https://opensource.microsoft.com/codeofconduct/)。 有关详细信息,请参阅[常见问题解答](https://opensource.microsoft.com/codeofconduct/faq/),如有任何疑问或意见可联系 opencode@microsoft.com
NNI 有一个月度发布周期(主要发布)。 如果您遇到问题可以通过 [创建 issue](https://github.com/microsoft/nni/issues/new/choose) 来报告

熟悉贡献协议后,即可按照 NNI 开发人员教程,创建第一个 PR:
我们感谢所有的贡献。 如果您计划提供任何 Bug 修复,请放手去做,不需要任何顾虑。

* 推荐新贡献者先从简单的问题开始:['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)。
* [NNI 开发环境安装教程](docs/zh_CN/Tutorial/SetupNniDeveloperEnvironment.rst)
* [如何调试](docs/zh_CN/Tutorial/HowToDebug.rst)
* 如果有使用上的问题,可先查看[常见问题解答](https://github.com/microsoft/nni/blob/master/docs/zh_CN/Tutorial/FAQ.rst)。如果没能解决问题,可通过 [Gitter](https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 联系 NNI 开发团队或在 GitHub 上 [报告问题](https://github.com/microsoft/nni/issues/new/choose)。
* [自定义 Tuner](docs/zh_CN/Tuner/CustomizeTuner.rst)
* [实现定制的训练平台](docs/zh_CN/TrainingService/HowToImplementTrainingService.rst)
* [在 NNI 上实现新的 NAS Trainer](docs/zh_CN/NAS/Advanced.rst)
* [自定义 Advisor](docs/zh_CN/Tuner/CustomizeAdvisor.rst)
如果您计划提供新的功能、新的 Tuner 和 新的训练平台等, 请先创建一个新的 issue 或重用现有 issue,并与我们讨论该功能。 我们会及时与您讨论这个问题,如有需要会安排电话会议。

## **其它代码库和参考**
如果需要了解更多如何贡献的信息,请参考 [如何贡献页面](https://nni.readthedocs.io/zh/stable/contribution.html)。

经作者许可的一些 NNI 用法示例和相关文档。
再次感谢所有的贡献者!

* ### **外部代码库** ###
* 在 NNI 中运行 [ENAS](examples/nas/enas/README_zh_CN.md)
* [NNI 中的自动特征工程](examples/feature_engineering/auto-feature-engineering/README_zh_CN.md)
* 使用 NNI 的 [矩阵分解超参调优](https://github.com/microsoft/recommenders/blob/master/examples/04_model_select_and_optimize/nni_surprise_svd.ipynb)
* [scikit-nni](https://github.com/ksachdeva/scikit-nni) 使用 NNI 为 scikit-learn 开发的超参搜索。
* ### **相关文章** ###
* [超参数优化的对比](docs/zh_CN/CommunitySharings/HpoComparison.rst)
* [神经网络结构搜索的对比](docs/zh_CN/CommunitySharings/NasComparison.rst)
* [并行化顺序算法:TPE](docs/zh_CN/CommunitySharings/ParallelizingTpeSearch.rst)
* [使用 NNI 为 SVD 自动调参](docs/zh_CN/CommunitySharings/RecommendersSvd.rst)
* [使用 NNI 为 SPTAG 自动调参](docs/zh_CN/CommunitySharings/SptagAutoTune.rst)
* [使用 NNI 为 scikit-learn 查找超参](https://towardsdatascience.com/find-thy-hyper-parameters-for-scikit-learn-pipelines-using-microsoft-nni-f1015b1224c1)
* **博客** - [AutoML 工具(Advisor,NNI 与 Google Vizier)的对比](http://gaocegege.com/Blog/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/katib-new#%E6%80%BB%E7%BB%93%E4%B8%8E%E5%88%86%E6%9E%90) 作者:[@gaocegege](https://github.com/gaocegege) - kubeflow/katib 的设计与实现的总结与分析章节
* **博客** - [NNI 2019 新功能汇总](https://mp.weixin.qq.com/s/7_KRT-rRojQbNuJzkjFMuA) by @squirrelsc
<a href="https://github.com/microsoft/nni/graphs/contributors"><img src="docs/img/contributors.png" /></a>

## **反馈**

* [在 GitHub 上提交问题](https://github.com/microsoft/nni/issues/new/choose)。
* 在 [Stack Overflow](https://stackoverflow.com/questions/tagged/nni?sort=Newest&edited=true) 上使用 nni 标签提问。
* 在 [Gitter](https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 中参与讨论。

加入聊天组:
Expand Down
1 change: 1 addition & 0 deletions dependencies/develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ sphinxcontrib-websupport
nbsphinx
pytest
coverage
ipython
3 changes: 1 addition & 2 deletions dependencies/required.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ responses
schema
PythonWebHDFS
colorama
scikit-learn >= 0.23.2
scikit-learn >= 0.24.1
websockets
filelock
prettytable
ipython
dataclasses ; python_version < "3.7"
numpy < 1.19.4 ; sys_platform == "win32"
numpy < 1.20 ; sys_platform != "win32" and python_version < "3.7"
Expand Down
5 changes: 3 additions & 2 deletions docs/en_US/CommunitySharings/NNI_AutoFeatureEng.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,6 @@ Conclusion: NNI could offer users some inspirations of design and it is a good o

Tips: Because the scripts of open source projects are compiled based on gcc7, Mac system may encounter problems of gcc (GNU Compiler Collection). The solution is as follows:

brew install libomp
===================
.. code-block:: bash

brew install libomp
2 changes: 1 addition & 1 deletion docs/en_US/FeatureEngineering/GBDTSelector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Then

.. code-block:: python

from nni.feature_engineering.gbdt_selector import GBDTSelector
from nni.algorithms.feature_engineering.gbdt_selector import GBDTSelector

# load data
...
Expand Down
2 changes: 1 addition & 1 deletion docs/en_US/FeatureEngineering/GradientFeatureSelector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Usage

.. code-block:: python

from nni.feature_engineering.gradient_selector import FeatureGradientSelector
from nni.algorithms.feature_engineering.gradient_selector import FeatureGradientSelector

# load data
...
Expand Down
4 changes: 2 additions & 2 deletions docs/en_US/NAS/Overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ NNI currently supports the one-shot NAS algorithms listed below and is adding mo
- `ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware <https://arxiv.org/abs/1812.00332>`__. It removes proxy, directly learns the architectures for large-scale target tasks and target hardware platforms.
* - `TextNAS <TextNAS.rst>`__
- `TextNAS: A Neural Architecture Search Space tailored for Text Representation <https://arxiv.org/pdf/1912.10729.pdf>`__. It is a neural architecture search algorithm tailored for text representation.
* - `Cream </NAS/Cream.html>`__
- `Cream of the Crop: Distilling Prioritized Paths For One-Shot Neural Architecture Search <https://papers.nips.cc/paper/2020/file/d072677d210ac4c03ba046120f0802ec-Paper.pdf>`__. It is a new NAS algorithm distilling prioritized paths in search space, without using evolutionary algorithms. Achieving competitive performance on ImageNet, especially for small models (e.g. <200 M Flops).
* - `Cream <Cream.rst>`__
- `Cream of the Crop: Distilling Prioritized Paths For One-Shot Neural Architecture Search <https://papers.nips.cc/paper/2020/file/d072677d210ac4c03ba046120f0802ec-Paper.pdf>`__. It is a new NAS algorithm distilling prioritized paths in search space, without using evolutionary algorithms. Achieving competitive performance on ImageNet, especially for small models (e.g. <200 M FLOPs).


One-shot algorithms run **standalone without nnictl**. NNI supports both PyTorch and Tensorflow 2.X.
Expand Down
16 changes: 8 additions & 8 deletions docs/en_US/NAS/retiarii/ApiReference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,31 @@ Graph Mutation APIs
Trainers
--------

.. autoclass:: nni.retiarii.trainer.FunctionalTrainer
.. autoclass:: nni.retiarii.evaluator.FunctionalEvaluator
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.lightning.LightningModule
.. autoclass:: nni.retiarii.evaluator.pytorch.lightning.LightningModule
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.lightning.Classification
.. autoclass:: nni.retiarii.evaluator.pytorch.lightning.Classification
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.lightning.Regression
.. autoclass:: nni.retiarii.evaluator.pytorch.lightning.Regression
:members:

Oneshot Trainers
----------------

.. autoclass:: nni.retiarii.trainer.pytorch.DartsTrainer
.. autoclass:: nni.retiarii.oneshot.pytorch.DartsTrainer
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.EnasTrainer
.. autoclass:: nni.retiarii.oneshot.pytorch.EnasTrainer
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.ProxylessTrainer
.. autoclass:: nni.retiarii.oneshot.pytorch.ProxylessTrainer
:members:

.. autoclass:: nni.retiarii.trainer.pytorch.SinglePathTrainer
.. autoclass:: nni.retiarii.oneshot.pytorch.SinglePathTrainer
:members:

Strategies
Expand Down
Loading