Unverified Commit f5b89bb6 authored by J-shang's avatar J-shang Committed by GitHub
Browse files

Merge pull request #4776 from microsoft/v2.7

parents 7aa44612 1546962f
......@@ -20,8 +20,8 @@ NNI automates feature engineering, neural architecture search, hyperparameter tu
## What's NEW! &nbsp;<a href="#nni-released-reminder"><img width="48" src="docs/img/release_icon.png"></a>
* **New release**: [v2.6 is available](https://github.com/microsoft/nni/releases/tag/v2.6) - _released on Jan-19-2022_
* **New demo available**: [Youtube entry](https://www.youtube.com/channel/UCKcafm6861B2mnYhPbZHavw) | [Bilibili 入口](https://space.bilibili.com/1649051673) - _last updated on May-26-2021_
* **New release**: [v2.7 is available](https://github.com/microsoft/nni/releases/tag/v2.7) - _released on Apr-18-2022_
* **New demo available**: [Youtube entry](https://www.youtube.com/channel/UCKcafm6861B2mnYhPbZHavw) | [Bilibili 入口](https://space.bilibili.com/1649051673) - _last updated on Apr-18-2022_
* **New webinar**: [Introducing Retiarii: A deep learning exploratory-training framework on NNI](https://note.microsoft.com/MSR-Webinar-Retiarii-Registration-Live.html) - _scheduled on June-24-2021_
* **New community channel**: [Discussions](https://github.com/microsoft/nni/discussions)
* **New emoticons release**: [nnSpider](https://nni.readthedocs.io/en/latest/sharings/nn_spider.html)
......
<p align="center">
<img src="docs/img/nni_logo.png" width="300"/>
</p>
* * *
[![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=stable)](https://nni.readthedocs.io/zh/stable/?badge=stable)
[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) ,和其他的云平台甚至 [混合模式](docs/zh_CN/TrainingService/HybridMode.rst) 。 DLTS)</a>[AML (Azure Machine Learning)](https://nni.readthedocs.io/zh/stable/TrainingService/AMLMode.html)[AdaptDL(又称 ADL)](https://nni.readthedocs.io/zh/stable/TrainingService/AdaptDLMode.html) ,和其他的云平台甚至[混合模式](https://nni.readthedocs.io/zh/stable/TrainingService/HybridMode.html)
## **使用场景**
* 想要在自己的代码、模型中试验**不同的自动机器学习算法**
* 想要在**不同的环境中**加速运行自动机器学习。
* 想要更容易**实现或试验新的自动机器学习算法**的研究员或数据科学家,包括:超参调优算法,神经网络搜索算法以及模型压缩算法。
* 在机器学习平台中**支持自动机器学习**
## **最新消息!** &nbsp;[<img width="48" src="docs/img/release_icon.png" />](#nni-released-reminder)
* **最新版本**[v2.6 已发布](https://github.com/microsoft/nni/releases/tag/v2.6) - *2022年1月19日*
* **最新视频 demo**[Youtube 入口](https://www.youtube.com/channel/UCKcafm6861B2mnYhPbZHavw) | [Bilibili 入口](https://space.bilibili.com/1649051673) - *上次更新:2021年5月26日*
* **最新网络研讨会**: [介绍Retiarii:NNI 上的深度学习探索性训练框架](https://note.microsoft.com/MSR-Webinar-Retiarii-Registration-Live.html) - *2021年6月24日*
* **最新互动渠道**: [Discussions](https://github.com/microsoft/nni/discussions)
* **最新粉丝福利表情包上线**[nnSpider](./docs/en_US/Tutorial/NNSpider.md)
<p align="center">
<a href="#nni-spider"><img width="100%" src="docs/img/emoicons/home.svg" /></a>
</p>
## **NNI 功能一览**
NNI 提供命令行工具以及友好的 WebUI 来管理训练的 Experiment。 通过可扩展的 API,可定制自动机器学习算法和训练平台。 为了方便新用户,NNI 内置了最新的自动机器学习算法,并为流行的训练平台提供了开箱即用的支持。
下表中,包含了 NNI 的功能,同时在不断地增添新功能,也非常希望您能贡献其中。
<p align="center">
<a href="#nni-has-been-released"><img src="docs/img/overview.svg" /></a>
</p>
<table>
<tbody>
<tr align="center" valign="bottom">
<td>
</td>
<td>
<b>支持的框架和库</b>
<img src="docs/img/bar.png"/>
</td>
<td>
<b>算法</b>
<img src="docs/img/bar.png"/>
</td>
<td>
<b>训练平台</b>
<img src="docs/img/bar.png"/>
</td>
</tr>
</tr>
<tr valign="top">
<td align="center" valign="middle">
<b>内置</b>
</td>
<td>
<ul><li><b>支持的框架</b></li>
<ul>
<li>PyTorch</li>
<li>Keras</li>
<li>TensorFlow</li>
<li>MXNet</li>
<li>Caffe2</li>
<a href="https://nni.readthedocs.io/zh/stable/SupportedFramework_Library.html">更多...</a><br/>
</ul>
</ul>
<ul>
<li><b>支持的库</b></li>
<ul>
<li>Scikit-learn</li>
<li>XGBoost</li>
<li>LightGBM</li>
<a href="https://nni.readthedocs.io/zh/stable/SupportedFramework_Library.html">更多...</a><br/>
</ul>
</ul>
<ul>
<li><b>示例</b></li>
<ul>
<li><a href="examples/trials/mnist-pytorch">MNIST-pytorch</li></a>
<li><a href="examples/trials/mnist-tfv1">MNIST-tensorflow</li></a>
<li><a href="examples/trials/mnist-keras">MNIST-keras</li></a>
<li><a href="https://nni.readthedocs.io/zh/stable/TrialExample/GbdtExample.html">Auto-gbdt</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrialExample/Cifar10Examples.html">Cifar10-pytorch</li></a>
<li><a href="https://nni.readthedocs.io/zh/stable/TrialExample/SklearnExamples.html">Scikit-learn</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrialExample/EfficientNet.html">EfficientNet</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrialExample/OpEvoExamples.html">GPU Kernel 调优</li></a>
<a href="https://nni.readthedocs.io/zh/stable/SupportedFramework_Library.html">更多...</a><br/>
</ul>
</ul>
</td>
<td align="left" >
<a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html">超参调优</a>
<ul>
<b>穷举搜索</b>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#Random">Random Search(随机搜索)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#GridSearch">Grid Search(遍历搜索)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#Batch">Batch(批处理)</a></li>
</ul>
<b>启发式搜索</b>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#Evolution">Naïve Evolution(朴素进化)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#Anneal">Anneal(退火算法)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#Hyperband">Hyperband</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#PBTTuner">PBT</a></li>
</ul>
<b>贝叶斯优化</b>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#BOHB">BOHB</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#TPE">TPE</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#SMAC">SMAC</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#MetisTuner">Metis Tuner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#GPTuner">GP Tuner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/BuiltinTuner.html#DNGOTuner">PPO Tuner</a></li>
</ul>
</ul>
<a href="https://nni.readthedocs.io/zh/stable/NAS/Overview.html">神经网络架构搜索</a>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/ENAS.html">ENAS</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/DARTS.html">DARTS</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/SPOS.html">SPOS</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/Proxylessnas.html">ProxylessNAS</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/FBNet.html">FBNet</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/ExplorationStrategies.html">基于强化学习</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/ExplorationStrategies.html">正则进化</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/Overview.html">更多...</a></li>
</ul>
<a href="https://nni.readthedocs.io/zh/stable/Compression/Overview.html">模型压缩</a>
<ul>
<b>剪枝</b>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#agp-pruner">AGP Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#slim-pruner">Slim Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#fpgm-pruner">FPGM Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#netadapt-pruner">NetAdapt Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#simulatedannealing-pruner">SimulatedAnnealing Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#admm-pruner">ADMM Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Pruner.html#autocompress-pruner">AutoCompress Pruner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Overview.html">更多...</a></li>
</ul>
<b>量化</b>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Quantizer.html#qat-quantizer">QAT Quantizer</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Quantizer.html#dorefa-quantizer">DoReFa Quantizer</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Compression/Quantizer.html#bnn-quantizer">BNN Quantizer</a></li>
</ul>
</ul>
<a href="https://nni.readthedocs.io/zh/stable/FeatureEngineering/Overview.html">特征工程(测试版)</a>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/FeatureEngineering/GradientFeatureSelector.html">GradientFeatureSelector</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/FeatureEngineering/GBDTSelector.html">GBDTSelector</a></li>
</ul>
<a href="https://nni.readthedocs.io/zh/stable/Assessor/BuiltinAssessor.html">提前终止算法</a>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Assessor/BuiltinAssessor.html#MedianStop">Median Stop(中位数终止)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Assessor/BuiltinAssessor.html#Curvefitting">Curve Fitting(曲线拟合)</a></li>
</ul>
</td>
<td>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/LocalMode.html">本机</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/RemoteMachineMode.html">远程计算机</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/HybridMode.html">混合模式</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/AMLMode.html">AML(Azure Machine Learning)</a></li>
<li><b>基于 Kubernetes 的平台</b></li>
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/PaiMode.html">OpenPAI</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/KubeflowMode.html">Kubeflow</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/FrameworkControllerMode.html">基于 Kubernetes(AKS 等)的 FrameworkController</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/DLTSMode.html">DLWorkspace(又称 DLTS)</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/AdaptDLMode.html">AdaptDL(又称 ADL)</a></li>
</ul>
</ul>
</td>
</tr>
<tr align="center" valign="bottom">
</td>
</tr>
<tr valign="top">
<td valign="middle">
<b>参考</b>
</td>
<td style="border-top:#FF0000 solid 0px;">
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/autotune_ref.html#trial">Python API</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tutorial/AnnotationSpec.html">NNI Annotation</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/installation.html">支持的操作系统</a></li>
</ul>
</td>
<td style="border-top:#FF0000 solid 0px;">
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/Tuner/CustomizeTuner.html">自定义 Tuner</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Assessor/CustomizeAssessor.html">自定义 Assessor</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/Tutorial/InstallCustomizedAlgos.html">安装自定义的 Tuner,Assessor,Advisor</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/QuickStart.html#define-your-model-space">定义模型空间</a></li>
<li><a href="https://nni.readthedocs.io/zh/stable/NAS/ApiReference.html">NAS/Retiarii接口</a></li>
</ul>
</td>
<td style="border-top:#FF0000 solid 0px;">
<ul>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/Overview.html">支持训练平台</li>
<li><a href="https://nni.readthedocs.io/zh/stable/TrainingService/HowToImplementTrainingService.html">实现训练平台</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
## **安装**
### **安装**
NNI 支持并在 Ubuntu >= 16.04, macOS >= 10.14.1, 和 Windows 10 >= 1809 通过了测试。 在 `python 64-bit >= 3.6` 的环境中,只需要运行 `pip install` 即可完成安装。
Linux 或 macOS
```bash
python3 -m pip install --upgrade nni
```
Windows
```bash
python -m pip install --upgrade nni
```
如果想试试最新代码,可参考从源代码[安装 NNI](https://nni.readthedocs.io/zh/latest/installation.html)
Linux 和 macOS 下 NNI 系统需求[参考这里](https://nni.readthedocs.io/zh/latest/Tutorial/InstallationLinux.html#system-requirements) ,Windows [参考这里](https://nni.readthedocs.io/zh/latest/Tutorial/InstallationWin.html#system-requirements)
注意:
* 如果遇到任何权限问题,可添加 `--user` 在用户目录中安装 NNI。
* 目前,Windows 上的 NNI 支持本机,远程和 OpenPAI 模式。 强烈推荐使用 Anaconda 或 Miniconda [在 Windows 上安装 NNI](https://nni.readthedocs.io/zh/stable/Tutorial/InstallationWin.html)
* 如果遇到如 `Segmentation fault` 等错误参考[常见问题](docs/zh_CN/Tutorial/FAQ.rst)。 Windows 上的 FAQ 参考[在 Windows 上使用 NNI](docs/zh_CN/Tutorial/InstallationWin.rst#faq)。 Windows 上的 FAQ 参考[在 Windows 上使用 NNI](https://nni.readthedocs.io/zh/stable/Tutorial/InstallationWin.html#faq)
### **验证安装**
* 通过克隆源代码下载示例。
```bash
git clone -b v2.6 https://github.com/Microsoft/nni.git
```
* 运行 MNIST 示例。
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 的界面。 此消息表明 Experiment 已成功启动。 通过命令行输出的 `Web UI url` 来访问 Experiment 的界面。
```text
INFO: Starting restful server...
INFO: Successfully started Restful server!
INFO: Setting local config...
INFO: Successfully set local config!
INFO: Starting experiment...
INFO: Successfully started experiment!
-----------------------------------------------------------------------
The experiment id is egchD4qy
The Web UI urls are: http://223.255.255.1:8080 http://127.0.0.1:8080
-----------------------------------------------------------------------
You can use these commands to get more information about the experiment
-----------------------------------------------------------------------
commands description
1. nnictl experiment show show the information of experiments
2. nnictl trial ls list all of trial jobs
3. nnictl top monitor the status of running experiments
4. nnictl log stderr show stderr log content
5. nnictl log stdout show stdout log content
6. nnictl stop stop an experiment
7. nnictl trial kill kill a trial job by id
8. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
```
* 在浏览器中打开 `Web UI url`,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看[这里](docs/zh_CN/Tutorial/WebUI.rst)的更多页面。 查看[这里](https://nni.readthedocs.io/zh/stable/Tutorial/WebUI.html)的更多页面。
<img src="docs/static/img/webui.gif" alt="webui" width="100%" />
## **发布和贡献**
NNI 有一个月度发布周期(主要发布)。 如果您遇到问题可以通过 [创建 issue](https://github.com/microsoft/nni/issues/new/choose) 来报告。
我们感谢所有的贡献。 我们感谢所有的贡献。 如果您计划提供任何 Bug 修复,请放手去做,不需要任何顾虑。
如果您计划提供新的功能、新的 Tuner 和 新的训练平台等, 请先创建一个新的 issue 或重用现有 issue,并与我们讨论该功能。 我们会及时与您讨论这个问题,如有需要会安排电话会议。
再次感谢所有的贡献者!
再次感谢所有的贡献者!
<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)
*[Gitter](https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 中参与讨论。
* NNI 有一个月度发布周期(主要发布)。 如果您遇到问题可以通过 [创建 issue](https://github.com/microsoft/nni/issues/new/choose) 来报告。
加入聊天组:
| Gitter | | 微信 |
| -------------------------------------------------------------------------------------------------------------- | - | ----------------------------------------------------------------------- |
| ![image](https://user-images.githubusercontent.com/39592018/80665738-e0574a80-8acc-11ea-91bc-0836dc4cbf89.png) | 或 | ![image](https://github.com/scarlett2018/nniutil/raw/master/wechat.png) |
## 测试状态
### 必需
| 类型 | 状态 |
|:------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Fast test | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/fast%20test?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=54&branchName=master) |
| Full linux | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/full%20test%20-%20linux?repoName=microsoft%2Fnni&branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=62&repoName=microsoft%2Fnni&branchName=master) |
| Full windows | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/full%20test%20-%20windows?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=63&branchName=master) |
### 训练平台
| 类型 | 状态 |
|:-------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Remote - linux to linux | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20remote%20-%20linux%20to%20linux?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=64&branchName=master) |
| Remote - linux to windows | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20remote%20-%20linux%20to%20windows?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=67&branchName=master) |
| Remote - windows to linux | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20remote%20-%20windows%20to%20linux?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=68&branchName=master) |
| OpenPAI | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20openpai%20-%20linux?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=65&branchName=master) |
| Frameworkcontroller | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20frameworkcontroller?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=70&branchName=master) |
| Kubeflow | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20kubeflow?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=69&branchName=master) |
| Hybrid | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20hybrid?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=79&branchName=master) |
| AzureML | [![Build Status](https://msrasrg.visualstudio.com/NNIOpenSource/_apis/build/status/integration%20test%20-%20aml?branchName=master)](https://msrasrg.visualstudio.com/NNIOpenSource/_build/latest?definitionId=78&branchName=master) |
## 相关项目
针对开放性和推进最先进的技术,[微软研究院(MSR)](https://www.microsoft.com/en-us/research/group/systems-and-networking-research-group-asia/) 还发布了其他几个开源项目。
* [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(深度神经网络)的缩写。
* [SPTAG](https://github.com/Microsoft/SPTAG) : Space Partition Tree And Graph (SPTAG) 是用于大规模向量的最近邻搜索场景的开源库。
我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。
## **许可协议**
代码库遵循 [MIT 许可协议](LICENSE)
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
## 安全
微软非常重视软件产品和服务的安全性,包括通过我们的 GitHub 组织管理的所有源代码库,其中涵盖 [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin),和 [我们 GitHub 的组织](https://opensource.microsoft.com/)
如果你在任何微软拥有的资源库中发现了安全漏洞,并且符合 [微软对安全漏洞的定义](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)),请按照下文所述向我们报告。
## 报告安全问题
**请不要通过公开的 GitHub 问题报告安全漏洞。**
相反,请向微软安全响应中心(MSRC)报告,链接是 [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report)
如果您希望在不登录的情况下提交,请发送电子邮件至 [secure@microsoft.com](mailto:secure@microsoft.com)。 如果可能的话,请用我们的 PGP 密钥对您的信息进行加密;请从以下网站下载该密钥 [微软安全响应中心 PGP 密钥页面](https://www.microsoft.com/en-us/msrc/pgp-key-msrc)
你应该在24小时内收到回复。 如果由于某些原因你没有收到,请通过电子邮件跟进,以确保我们收到你的原始信息。 其他信息可以在以下网站找到 [microsoft.com/msrc](https://www.microsoft.com/msrc)
请包括以下所要求的信息(尽可能多地提供),以帮助我们更好地了解可能的问题的性质和范围。
* 问题类型(如缓冲区溢出、SQL 注入、跨站脚本等)
* 与问题表现有关的源文件的完整路径
* 受影响的源代码位置(标签/分支/提交或 URL)
* 重现该问题所需的任何特殊配置
* 重现该问题的分步骤说明
* 概念证明或漏洞代码(如果可能的话)
* 该问题的影响,包括攻击者如何利用该问题
这些信息将帮助我们更快地对你的报告进行分流。
如果您需要报告错误赏金,更完整的报告可有助于获得更高的赏金奖励。 请访问我们的[微软漏洞赏金计划](https://microsoft.com/msrc/bounty)页面,以了解有关我们活动计划的更多详细信息。
## 首选语言
我们希望所有的交流都是用英语进行的。
## 政策
微软遵循[协调漏洞披露](https://www.microsoft.com/en-us/msrc/cvd)的原则。
<!-- END MICROSOFT SECURITY.MD BLOCK -->
......@@ -160,6 +160,8 @@ If the output shape of the pruned conv layer is not divisible by 1024(for exampl
not_safe = not_safe_to_prune(model, dummy_input)
.. _flops-counter:
Model FLOPs/Parameters Counter
------------------------------
......
......@@ -4,7 +4,7 @@ Pruner in NNI
NNI implements the main part of the pruning algorithm as pruner. All pruners are implemented as close as possible to what is described in the paper (if it has).
The following table provides a brief introduction to the pruners implemented in nni, click the link in table to view a more detailed introduction and use cases.
There are two kinds of pruners in NNI, please refer to `basic pruner <basic-pruner>`_ and `scheduled pruner <scheduled-pruner>`_ for details.
There are two kinds of pruners in NNI, please refer to :ref:`basic pruner <basic-pruner>` and :ref:`scheduled pruner <scheduled-pruner>` for details.
.. list-table::
:header-rows: 1
......
......@@ -31,7 +31,7 @@ author = 'Microsoft'
version = ''
# The full version, including alpha/beta/rc tags
# FIXME: this should be written somewhere globally
release = 'v2.6'
release = 'v2.7'
# -- General configuration ---------------------------------------------------
......@@ -95,6 +95,16 @@ autodoc_inherit_docstrings = False
# Sphinx will warn about all references where the target cannot be found.
nitpicky = False # disabled for now
# A list of regular expressions that match URIs that should not be checked.
linkcheck_ignore = [
r'http://localhost:\d+',
r'.*://.*/#/', # Modern websites that has URLs like xxx.com/#/guide
r'https://github.com/JSong-Jia/Pic/', # Community links can't be found any more
]
# Ignore all links located in release.rst
linkcheck_exclude_documents = ['^release']
# Bibliography files
bibtex_bibfiles = ['refs.bib']
......
Examples
========
More examples can be found in our :githublink:`GitHub repository <nni/examples>`.
More examples can be found in our :githublink:`GitHub repository <examples>`.
.. cardlinkitem::
:header: HPO Quickstart with PyTorch
......@@ -19,6 +19,14 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
:background: purple
:tags: HPO
.. cardlinkitem::
:header: HPO using command line tool
:description: Run HPO experiment with nnictl
:link: tutorials/hpo_nnictl/nnictl
:image: ../img/thumbnails/hpo-pytorch.svg
:background: purple
:tags: HPO
.. cardlinkitem::
:header: Hello, NAS!
:description: Beginners' NAS tutorial on how to search for neural architectures for MNIST dataset.
......
......@@ -6,7 +6,7 @@ An experiment can be created with command line tool ``nnictl`` or python APIs. N
Management with ``nnictl``
--------------------------
The ability of ``nnictl`` on experiment management is almost equivalent to :doc:`web_portal/web_portal`. Users can refer to :doc:`../reference/nnictl` for detailed usage. It is highly suggested when visualization is not well supported in your environment (e.g., no GUI on your machine).
The ability of ``nnictl`` on experiment management is almost equivalent to :doc:`web_portal/web_portal`. Users can refer to :doc:`../reference/nnictl` for detailed usage. It is highly suggested when visualization is not well supported in your environment (e.g., web browser is not supported in your environment).
Management with web portal
--------------------------
......
......@@ -4,6 +4,8 @@ AdaptDL Training Service
Now NNI supports running experiment on `AdaptDL <https://github.com/petuum/adaptdl>`__, which is a resource-adaptive deep learning training and scheduling framework. With AdaptDL training service, your trial program will run as AdaptDL job in Kubernetes cluster.
AdaptDL aims to make distributed deep learning easy and efficient in dynamic-resource environments such as shared clusters and the cloud.
.. note:: AdaptDL doesn't support :ref:`reuse mode <training-service-reuse>`.
Prerequisite
------------
......@@ -37,7 +39,7 @@ Verify the Prerequisites
Usage
-----
We have a CIFAR10 example that fully leverages the AdaptDL scheduler under :githublink:`examples/trials/cifar10_pytorch` folder. (:githublink:`main_adl.py <examples/trials/cifar10_pytorch/main_adl.py>` and :githublink:`config_adl.yaml <examples/trials/cifar10_pytorch/config_adl.yaml>`)
We have a CIFAR10 example that fully leverages the AdaptDL scheduler under :githublink:`examples/trials/cifar10_pytorch` folder. (:githublink:`main_adl.py <examples/trials/cifar10_pytorch/main_adl.py>` and :githublink:`config_adl.yaml <examples/trials/cifar10_pytorch/config_adl.yml>`)
Here is a template configuration specification to use AdaptDL as a training service.
......
......@@ -15,7 +15,7 @@ System architecture
:alt:
The brief system architecture of NNI is shown in the picture. NNIManager is the core management module of system, in charge of calling TrainingService to manage trial jobs and the communication between different modules. Dispatcher is a message processing center responsible for message dispatch. TrainingService is a module to manage trial jobs, it communicates with nniManager module, and has different instance according to different training platform. For the time being, NNI supports `local platfrom <LocalMode.rst>`__\ , `remote platfrom <RemoteMachineMode.rst>`__\ , `PAI platfrom <PaiMode.rst>`__\ , `kubeflow platform <KubeflowMode.rst>`__ and `FrameworkController platfrom <FrameworkControllerMode.rst>`__.
The brief system architecture of NNI is shown in the picture. NNIManager is the core management module of system, in charge of calling TrainingService to manage trial jobs and the communication between different modules. Dispatcher is a message processing center responsible for message dispatch. TrainingService is a module to manage trial jobs, it communicates with nniManager module, and has different instance according to different training platform. For the time being, NNI supports :doc:`./local`, :doc:`./remote`, :doc:`./openpai`, :doc:`./kubeflow` and :doc:`./frameworkcontroller`.
In this document, we introduce the brief design of TrainingService. If users want to add a new TrainingService instance, they just need to complete a child class to implement TrainingService, don't need to understand the code detail of NNIManager, Dispatcher or other modules.
......@@ -185,6 +185,4 @@ When users submit a trial job to cloud platform, they should wrap their trial co
Reference
---------
For more information about how to debug, please `refer <../Tutorial/HowToDebug.rst>`__.
The guideline of how to contribute, please `refer <../Tutorial/Contributing.rst>`__.
The guideline of how to contribute, please refer to :doc:`/notes/contributing`.
......@@ -60,14 +60,12 @@ Follow the `guideline <https://github.com/Microsoft/frameworkcontroller/tree/mas
to set up FrameworkController in the Kubernetes cluster, NNI supports FrameworkController by the stateful set mode.
If your cluster enforces authorization, you need to create a service account with granted permission for FrameworkController,
and then pass the name of the FrameworkController service account to the NNI Experiment Config.
`refer <https://github.com/Microsoft/frameworkcontroller/tree/master/example/run#run-by-kubernetes-statefulset>`__.
If the k8s cluster enforces Authorization, you also need to create a ServiceAccount with granted permission for FrameworkController,
`refer <https://github.com/microsoft/frameworkcontroller/tree/master/example/run#prerequisite>`__.
If the k8s cluster enforces Authorization, you also need to create a ServiceAccount with granted permission for FrameworkController.
Design
------
Please refer the design of `Kubeflow training service <KubeflowMode.rst>`__,
Please refer the design of :doc:`Kubeflow training service <kubeflow>`,
FrameworkController training service pipeline is similar.
Example
......@@ -115,7 +113,7 @@ If you use Azure Kubernetes Service, you should set storage config as follows:
experiment.config.training_service.storage.key_vault_name = 'your_vault_name'
experiment.config.training_service.storage.key_vault_key = 'your_secret_name'
If you set `ServiceAccount <https://github.com/microsoft/frameworkcontroller/tree/master/example/run#prerequisite>`__ in your k8s,
If you set `ServiceAccount <https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/>`__ in your k8s,
please set ``serviceAccountName`` in your config:
.. code-block:: python
......
......@@ -8,6 +8,8 @@ Prerequisite
NNI has supported :doc:`./local`, :doc:`./remote`, :doc:`./openpai`, :doc:`./aml`, :doc:`./kubeflow`, :doc:`./frameworkcontroller`, for hybrid training service. Before starting an experiment using using hybrid training service, users should first setup their chosen (sub) training services (e.g., remote training service) according to each training service's own document page.
.. note:: Reuse mode is disabled by default for local training service. But if you are using local training service in hybrid, :ref:`reuse mode <training-service-reuse>` is enabled by default.
Usage
-----
......
......@@ -3,6 +3,8 @@ Local Training Service
With local training service, the whole experiment (e.g., tuning algorithms, trials) runs on a single machine, i.e., user's dev machine. The generated trials run on this machine following ``trialConcurrency`` set in the configuration yaml file. If GPUs are used by trial, local training service will allocate required number of GPUs for each trial, like a resource scheduler.
.. note:: Currently, :ref:`reuse mode <training-service-reuse>` remains disabled by default in local training service.
Prerequisite
------------
......
......@@ -6,7 +6,7 @@ NNI supports running an experiment on `OpenPAI <https://github.com/Microsoft/pai
Prerequisite
------------
1. Before starting to use OpenPAI training service, you should have an account to access an `OpenPAI <https://github.com/Microsoft/pai>`__ cluster. See `here <https://github.com/Microsoft/pai#how-to-deploy>`__ if you don't have any OpenPAI account and want to deploy an OpenPAI cluster. Please note that, on OpenPAI, your trial program will run in Docker containers.
1. Before starting to use OpenPAI training service, you should have an account to access an `OpenPAI <https://github.com/Microsoft/pai>`__ cluster. See `here <https://github.com/Microsoft/pai>`__ if you don't have any OpenPAI account and want to deploy an OpenPAI cluster. Please note that, on OpenPAI, your trial program will run in Docker containers.
2. Get token. Open web portal of OpenPAI, and click ``My profile`` button in the top-right side.
......@@ -100,7 +100,7 @@ Compared with :doc:`local` and :doc:`remote`, OpenPAI training service supports
* - trialMemorySize
- Optional field. Should be in format like ``2gb`` based on your trial program's memory requirement. If it's not set in trial configuration, it should be set in the config specified in ``openpaiConfig`` or ``openpaiConfigFile`` field.
* - dockerImage
- Optional field. In OpenPAI training service, your trial program will be scheduled by OpenPAI to run in `Docker container <https://www.docker.com/>`__. This key is used to specify the Docker image used to create the container in which your trial will run. Upon every NNI release, we build `a docker image <https://hub.docker.com/r/msranni/nni>`__ with :githublink:`this Dockerfile <https://hub.docker.com/r/msranni/nni>`. You can either use this image directly in your config file, or build your own image. If it's not set in trial configuration, it should be set in the config specified in ``openpaiConfig`` or ``openpaiConfigFile`` field.
- Optional field. In OpenPAI training service, your trial program will be scheduled by OpenPAI to run in `Docker container <https://www.docker.com/>`__. This key is used to specify the Docker image used to create the container in which your trial will run. Upon every NNI release, we build `a docker image <https://hub.docker.com/r/msranni/nni>`__ with `this Dockerfile <https://hub.docker.com/r/msranni/nni>`__. You can either use this image directly in your config file, or build your own image. If it's not set in trial configuration, it should be set in the config specified in ``openpaiConfig`` or ``openpaiConfigFile`` field.
* - virtualCluster
- Optional field. Set the virtualCluster of OpenPAI. If omitted, the job will run on ``default`` virtual cluster.
* - localStorageMountPoint
......
......@@ -9,21 +9,30 @@ NNI has supported many training services listed below. Users can go through each
* - Training Service
- Description
* - Local
* - :doc:`Local <local>`
- The whole experiment runs on your dev machine (i.e., a single local machine)
* - Remote
- The trials are dispatched to your configured remote servers
* - OpenPAI
* - :doc:`Remote <remote>`
- The trials are dispatched to your configured SSH servers
* - :doc:`OpenPAI <openpai>`
- Running trials on OpenPAI, a DNN model training platform based on Kubernetes
* - Kubeflow
* - :doc:`Kubeflow <kubeflow>`
- Running trials with Kubeflow, a DNN model training framework based on Kubernetes
* - AdaptDL
* - :doc:`AdaptDL <adaptdl>`
- Running trials on AdaptDL, an elastic DNN model training platform
* - FrameworkController
* - :doc:`FrameworkController <frameworkcontroller>`
- Running trials with FrameworkController, a DNN model training framework on Kubernetes
* - AML
- Running trials on AML cloud service
* - PAI-DLC
* - :doc:`AML <aml>`
- Running trials on Azure Machine Learning (AML) cloud service
* - :doc:`PAI-DLC <paidlc>`
- Running trials on PAI-DLC, which is deep learning containers based on Alibaba ACK
* - Hybrid
* - :doc:`Hybrid <hybrid>`
- Support jointly using multiple above training services
.. _training-service-reuse:
Training Service Under Reuse Mode
---------------------------------
Since NNI v2.0, there are two sets of training service implementations in NNI. The new one is called *reuse mode*. When reuse mode is enabled, a cluster, such as a remote machine or a computer instance on AML, will launch a long-running environment, so that NNI will submit trials to these environments iteratively, which saves the time to create new jobs. For instance, using OpenPAI training platform under reuse mode can avoid the overhead of pulling docker images, creating containers, and downloading data repeatedly.
.. note:: In the reuse mode, users need to make sure each trial can run independently in the same job (e.g., avoid loading checkpoints from previous trials).
......@@ -8,7 +8,7 @@ PAI-DSW server performs the role to submit a job while PAI-DLC is where the trai
Prerequisite
------------
Step 1. Install NNI, follow the install guide `here <../Tutorial/QuickStart.rst>`__.
Step 1. Install NNI, follow the :doc:`install guide </installation>`.
Step 2. Create PAI-DSW server following this `link <https://help.aliyun.com/document_detail/163684.html?section-2cw-lsi-es9#title-ji9-re9-88x>`__. Note as the training service will be run on PAI-DLC, it won't cost many resources to run and you may just need a PAI-DSW server with CPU.
......@@ -60,7 +60,7 @@ Use ``examples/trials/mnist-pytorch`` as an example. The NNI config YAML file's
Note: You should set ``platform: dlc`` in NNI config YAML file if you want to start experiment in dlc mode.
Compared with `LocalMode <LocalMode.rst>`__ training service configuration in dlc mode have these additional keys like ``type/image/jobType/podCount/ecsSpec/region/nasDataSourceId/accessKeyId/accessKeySecret``, for detailed explanation ref to this `link <https://help.aliyun.com/document_detail/203111.html#h2-url-3>`__.
Compared with :doc:`local`, training service configuration in dlc mode have these additional keys like ``type/image/jobType/podCount/ecsSpec/region/nasDataSourceId/accessKeyId/accessKeySecret``, for detailed explanation ref to this `link <https://help.aliyun.com/document_detail/203111.html#h2-url-3>`__.
Also, as dlc mode requires DSW/DLC to mount the same NAS disk to share information, there are two extra keys related to this: ``localStorageMountPoint`` and ``containerStorageMountPoint``.
......
......@@ -13,7 +13,7 @@ Prerequisite
2. Make sure remote machines can be accessed through SSH from the machine which runs ``nnictl`` command. It supports both password and key authentication of SSH. For advanced usage, please refer to :ref:`reference-remote-config-label` in reference for detailed usage.
3. Make sure the NNI version on each machine is consistent. Follow the install guide `here <../Tutorial/QuickStart.rst>`__ to install NNI.
3. Make sure the NNI version on each machine is consistent. Follow the install guide :doc:`here </installation>` to install NNI.
4. Make sure the command of Trial is compatible with remote OSes, if you want to use remote Linux and Windows together. For example, the default python 3.x executable called ``python3`` on Linux, and ``python`` on Windows.
......@@ -85,7 +85,7 @@ You can run below command on Windows, Linux, or macOS to spawn trials on remote
.. _nniignore:
.. Note:: If you are planning to use remote machines or clusters as your training service, to avoid too much pressure on network, NNI limits the number of files to 2000 and total size to 300MB. If your codeDir contains too many files, you can choose which files and subfolders should be excluded by adding a ``.nniignore`` file that works like a ``.gitignore`` file. For more details on how to write this file, see the `git documentation <https://git-scm.com/docs/gitignore#_pattern_format>`__.
.. Note:: If you are planning to use remote machines or clusters as your training service, to avoid too much pressure on network, NNI limits the number of files to 2000 and total size to 300MB. If your trial code directory contains too many files, you can choose which files and subfolders should be excluded by adding a ``.nniignore`` file that works like a ``.gitignore`` file. For more details on how to write this file, see the `git documentation <https://git-scm.com/docs/gitignore#_pattern_format>`__.
*Example:* :githublink:`config_detailed.yml <examples/trials/mnist-pytorch/config_detailed.yml>` and :githublink:`.nniignore <examples/trials/mnist-pytorch/.nniignore>`
......@@ -111,4 +111,4 @@ Remote training service support shared storage, which can help use your own stor
Monitor via TensorBoard
^^^^^^^^^^^^^^^^^^^^^^^
Remote training service support trial visualization via TensorBoard. Follow the guide `here <./tensorboard.rst>`__ to learn how to use TensorBoard.
Remote training service support trial visualization via TensorBoard. Follow the guide :doc:`/experiment/web_portal/tensorboard` to learn how to use TensorBoard.
......@@ -7,7 +7,7 @@ All the information generated by the experiment will be stored under ``/nni`` fo
All the output produced by the trial will be located under ``/nni/{EXPERIMENT_ID}/trials/{TRIAL_ID}/nnioutput`` folder in your shared storage.
This saves you from finding for experiment-related information in various places.
Remember that your trial working directory is ``/nni/{EXPERIMENT_ID}/trials/{TRIAL_ID}``, so if you upload your data in this shared storage, you can open it like a local file in your trial code without downloading it.
And we will develop more practical features in the future based on shared storage. The config reference can be found `here <../reference/experiment_config.html#sharedstorageconfig>`_.
And we will develop more practical features in the future based on shared storage. The config reference can be found :ref:`here <reference-sharedstorage-config-label>`.
.. note::
Shared storage is currently in the experimental stage. We suggest use AzureBlob under Ubuntu/CentOS/RHEL, and NFS under Ubuntu/CentOS/RHEL/Fedora/Debian for remote.
......
###########################
Hyperparameter Optimization
###########################
Advanced Usage
==============
.. toctree::
:maxdepth: 2
:hidden:
Command Line Tool Example </tutorials/hpo_nnictl/nnictl>
Implement Custom Tuners and Assessors <custom_algorithm>
Install Custom or 3rd-party Tuners and Assessors <custom_algorithm_installation>
Tuner Benchmark <hpo_benchmark>
Tuner Benchmark Example Statistics <hpo_benchmark_stats>
......@@ -125,7 +125,7 @@ More detail example you could see:
Write a more advanced automl algorithm
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The methods above are usually enough to write a general tuner. However, users may also want more methods, for example, intermediate results, trials' state (e.g., the methods in assessor), in order to have a more powerful automl algorithm. Therefore, we have another concept called ``advisor`` which directly inherits from ``MsgDispatcherBase`` in :githublink:`msg_dispatcher_base.py <nni/runtime/msg_dispatcher_base.py>`. Please refer to `here <CustomizeAdvisor.rst>`__ for how to write a customized advisor.
The methods above are usually enough to write a general tuner. However, users may also want more methods, for example, intermediate results, trials' state (e.g., the methods in assessor), in order to have a more powerful automl algorithm. Therefore, we have another concept called ``advisor`` which directly inherits from ``MsgDispatcherBase`` in :githublink:`msg_dispatcher_base.py <nni/runtime/msg_dispatcher_base.py>`.
Customize Assessor
------------------
......
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