Commit 1011377c authored by qianyj's avatar qianyj
Browse files

the source code of NNI for DCU

parent abc22158
../../en_US/Tutorial/HowToLaunchFromPython.rst
\ No newline at end of file
../../en_US/Tutorial/HowToUseDocker.rst
\ No newline at end of file
../../en_US/Tutorial/HowToUseSharedStorage.rst
\ No newline at end of file
../../en_US/Tutorial/InstallCustomizedAlgos.rst
\ No newline at end of file
.. 1488ec09b21ac2a6c35b41f710c9211e
在 Linux 和 Mac 下安装
======================
安装
------------
在 Linux 和 macOS 上安装,遵循以下相同的说明。
通过 pip 命令安装 NNI
^^^^^^^^^^^^^^^^^^^^^^^
先决条件:``python 64-bit >= 3.6``
.. code-block:: bash
python3 -m pip install --upgrade nni
通过源代码安装 NNI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
如果对某个或最新版本的代码感兴趣,可通过源代码安装 NNI。
先决条件:``python 64-bit >=3.6``, ``git``
.. code-block:: bash
git clone -b v2.6 https://github.com/Microsoft/nni.git
cd nni
python3 -m pip install --upgrade pip setuptools
python3 setup.py develop
从 NNI 源代码构建 Wheel 包
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
上一节介绍了如何在 `开发模式 <https://setuptools.readthedocs.io/en/latest/userguide/development_mode.html>`__ 下安装NNI。
如果要执行持久安装,建议您构建自己的 wheel 软件包并从wheel 安装。
.. code-block:: bash
git clone -b v2.6 https://github.com/Microsoft/nni.git
cd nni
export NNI_RELEASE=2.6
python3 -m pip install --upgrade pip setuptools wheel
python3 setup.py clean --all
python3 setup.py build_ts
python3 setup.py bdist_wheel -p manylinux1_x86_64
python3 -m pip install dist/nni-2.6-py3-none-manylinux1_x86_64.whl
在 Docker 映像中使用 NNI
^^^^^^^^^^^^^^^^^^^^^^^^^
也可将 NNI 安装到 docker 映像中。 参考 `这里 <../Tutorial/HowToUseDocker.rst>`__ 来生成 NNI 的 docker 映像。 也可通过此命令从 Docker Hub 中直接拉取 NNI 的映像 ``docker pull msranni/nni:latest``。
验证安装
-------------------
*
通过克隆源代码下载示例。
.. code-block:: bash
git clone -b v2.6 https://github.com/Microsoft/nni.git
*
运行 MNIST 示例。
.. code-block:: bash
nnictl create --config nni/examples/trials/mnist-pytorch/config.yml
*
在命令行中等待输出 ``INFO: Successfully started experiment!`` 。 此消息表明实验已成功启动。 通过命令行输出的 Web UI url 来访问 Experiment 的界面。
.. code-block:: 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``,可看到下图的实验详细信息,以及所有的尝试任务。 查看 `这里 <../Tutorial/WebUI.rst>`__ 的更多页面。
.. image:: ../../img/webui_overview_page.png
:target: ../../img/webui_overview_page.png
:alt: overview
.. image:: ../../img/webui_trialdetail_page.png
:target: ../../img/webui_trialdetail_page.png
:alt: detail
系统需求
-------------------
由于程序变更,NNI 的最低配置会有所更改。
Linux
^^^^^
.. list-table::
:header-rows: 1
:widths: auto
* -
- 推荐配置
- 最低配置
* - **操作系统**
- Ubuntu 16.04 或以上版本
-
* - **CPU**
- Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置
- Intel® Core™ i3 或 AMD Phenom™ X3 8650
* - **GPU**
- NVIDIA® GeForce® GTX 660 或更高配置
- NVIDIA® GeForce® GTX 460
* - **内存**
- 6 GB
- 4 GB
* - **存储**
- 30 GB 可用的磁盘空间
-
* - **网络**
- 宽带连接
-
* - **分辨率**
- 1024 x 768 以上
-
macOS
^^^^^
.. list-table::
:header-rows: 1
:widths: auto
* -
- 推荐配置
- 最低配置
* - **操作系统**
- macOS 10.14.1 或更高版本
-
* - **CPU**
- Intel® Core™ i7-4770 或更高
- Intel® Core™ i5-760 或更高
* - **GPU**
- AMD Radeon™ R9 M395X 或更高
- NVIDIA® GeForce® GT 750M 或 AMD Radeon™ R9 M290 或更高
* - **内存**
- 8 GB
- 4 GB
* - **存储**
- 70GB 可用空间 SSD 硬盘
- 70GB 可用空间及 7200 RPM 硬盘
* - **网络**
- 宽带连接
-
* - **分辨率**
- 1024 x 768 以上
-
更多
---------------
* `概述 <../Overview.rst>`__
* `如何使用命令行工具 nnictl <Nnictl.rst>`__
* `如何使用 NNIBoard <WebUI.rst>`__
* `定义搜索空间 <SearchSpaceSpec.rst>`__
* `定义实验配置 <ExperimentConfig.rst>`__
* `如何在本机运行 Experiment (支持多 GPU 卡)? <../TrainingService/LocalMode.rst>`__
* `如何在多机上运行 Experiment? <../TrainingService/RemoteMachineMode.rst>`__
* `如何在 OpenPAI 上运行 Experiment? <../TrainingService/PaiMode.rst>`__
* `如何通过 Kubeflow 在 Kubernetes 上运行 Experiment? <../TrainingService/KubeflowMode.rst>`__
* `How to run an experiment on Kubernetes through FrameworkController? <../TrainingService/FrameworkControllerMode.rst>`__
* `如何通过 AdaptDL在 Kubernetes 上运行 Experiment? <../TrainingService/AdaptDLMode.rst>`__
.. acdfab53c8209a53709a5bdca72d29b2
在 Windows 上安装
==================
先决条件
-----------
*
Python 3.6(或以上)64 位。 在 Windows 上推荐使用 `Anaconda <https://www.anaconda.com/products/individual>`__ 或 `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`__ 来管理多个 Python 环境。
*
如果是新安装的 Python 环境,需要安装 `Microsoft C++ Build Tools <https://visualstudio.microsoft.com/visual-cpp-build-tools/>`__ 来支持 NNI 的依赖项,如 ``scikit-learn``。
.. code-block:: bat
pip install cython wheel
*
安装 git 用于验证安装。
安装 NNI
-----------
大多数情况下,可以从 pip 包安装和升级 NNI。 这样既方便又快捷。
如果对某个或最新版本的代码感兴趣,可通过源代码安装 NNI。
如果要为 NNI 贡献代码,参考 `设置开发环境 <SetupNniDeveloperEnvironment.rst>`__。
*
从 pip 包安装
.. code-block:: bat
python -m pip install --upgrade nni
*
从源代码安装
.. code-block:: bat
git clone -b v2.6 https://github.com/Microsoft/nni.git
cd nni
python setup.py develop
验证安装
-------------------
*
克隆源代码中的示例。
.. code-block:: bat
git clone -b v2.6 https://github.com/Microsoft/nni.git
*
运行 MNIST 示例。
.. code-block:: bat
nnictl create --config nni\examples\trials\mnist-pytorch\config_windows.yml
注意:如果熟悉其它框架,可选择 ``examples\trials`` 目录下对应的示例。 需要将示例 YAML 文件中 Trial 命令的 ``python3`` 改为 ``python``,这是因为默认安装的 Python 可执行文件是 ``python.exe``,没有 ``python3.exe``。
*
在命令行中等待输出 ``INFO: Successfully started experiment!`` 。 此消息表明实验已成功启动。 通过命令行输出的 Web UI url 来访问 Experiment 的界面。
.. code-block:: 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``,可看到下图的实验详细信息,以及所有的尝试任务。 查看 `这里 <../Tutorial/WebUI.rst>`__ 的更多页面。
.. image:: ../../img/webui_overview_page.png
:target: ../../img/webui_overview_page.png
:alt: overview
.. image:: ../../img/webui_trialdetail_page.png
:target: ../../img/webui_trialdetail_page.png
:alt: detail
系统需求
-------------------
以下是 NNI 在 Windows 上的最低配置,推荐使用 Windows 10 1809 版。 由于程序变更,NNI 的最低配置会有所更改。
.. list-table::
:header-rows: 1
:widths: auto
* -
- 推荐配置
- 最低配置
* - **操作系统**
- Windows 10 1809 或更高版本
-
* - **CPU**
- Intel® Core™ i5 或 AMD Phenom™ II X3 或更高配置
- Intel® Core™ i3 或 AMD Phenom™ X3 8650
* - **GPU**
- NVIDIA® GeForce® GTX 660 或更高配置
- NVIDIA® GeForce® GTX 460
* - **内存**
- 6 GB
- 4 GB
* - **存储**
- 30 GB 可用的磁盘空间
-
* - **网络**
- 宽带连接
-
* - **分辨率**
- 1024 x 768 以上
-
常见问答
------------
安装 NNI 时出现 simplejson 错误
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
确保安装了 C++ 14.0 编译器。
..
building 'simplejson._speedups' extension error: [WinError 3] The system cannot find the path specified
在命令行或 PowerShell 中,Trial 因为缺少 DLL 而失败
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
此错误因为缺少 LIBIFCOREMD.DLL 和 LIBMMD.DLL 文件,且 SciPy 安装失败。 使用 Anaconda 或 Miniconda 和 Python(64位)可解决。
..
ImportError: DLL load failed
Web 界面上的 Trial 错误
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
检查 Trial 日志文件来了解详情。
如果存在 stderr 文件,也需要查看其内容。 两种可能的情况是:
* 忘记将 Experiment 配置的 Trial 命令中的 ``python3`` 改为 ``python``。
* 忘记安装 Experiment 的依赖,如 TensorFlow,Keras 等。
无法在 Windows 上使用 BOHB
^^^^^^^^^^^^^^^^^^^^^^^^^^^
确保安装了 C ++ 14.0 编译器然后尝试运行 ``pip install nni[BOHB]`` 来安装依赖项。
Windows 上不支持的 Tuner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
当前不支持 SMAC,原因可参考 `此问题 <https://github.com/automl/SMAC3/issues/483>`__。
用 Windows 作为远程节点
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
参考 `远程模式 <../TrainingService/RemoteMachineMode.rst>`__.
安装时出现 Segmentation Fault (core dumped)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
参考 `常见问题 <FAQ.rst>`__。
更多
---------------
* `概述 <../Overview.rst>`__
* `如何使用命令行工具 nnictl <Nnictl.rst>`__
* `如何使用 NNIBoard <WebUI.rst>`__
* `定义搜索空间 <SearchSpaceSpec.rst>`__
* `定义实验配置 <ExperimentConfig.rst>`__
* `如何在本机运行 Experiment (支持多 GPU 卡)? <../TrainingService/LocalMode.rst>`__
* `如何在多机上运行 Experiment? <../TrainingService/RemoteMachineMode.rst>`__
* `如何在 OpenPAI 上运行 Experiment? <../TrainingService/PaiMode.rst>`__
* `如何通过 Kubeflow 在 Kubernetes 上运行 Experiment? <../TrainingService/KubeflowMode.rst>`__
* `如何通过 FrameworkController 在 Kubernetes 上运行 Experiment? <../TrainingService/FrameworkControllerMode.rst>`__
../../en_US/Tutorial/NNSpider.md
\ No newline at end of file
../../en_US/Tutorial/Nnictl.rst
\ No newline at end of file
.. df9198c942071002424be17beef23cf5
快速入门
==========
安装
----
目前NNI支持了 LinuxmacOS Windows系统。 其中,Ubuntu 16.04 及更高版本、macOS 10.14.1 Windows 10.1809 均经过测试并支持。 ``python >= 3.6`` 环境中,只需运行 ``pip install`` 即可完成安装。
Linux macOS
^^^^^^^^^^^^^^
.. code-block:: bash
python3 -m pip install --upgrade nni
Windows
^^^^^^^
.. code-block:: bash
python -m pip install --upgrade nni
.. Note:: Linux macOS 上,如果要将 NNI 安装到当前用户的 home 目录中,可使用 ``--user`` ;这不需要特殊权限。
.. Note:: 如果出现 ``Segmentation fault`` 这样的错误,参考 :doc:`常见问题 <FAQ>`
.. Note:: NNI 的系统需求,参考 :doc:`Linux & Mac <InstallationLinux>` 或者 :doc:`Windows <InstallationWin>` 的安装教程。如果想要使用 docker, 参考 :doc:`如何使用 Docker <HowToUseDocker>`
MNIST 上的 "Hello World"
------------------------
NNI 是一个能进行自动机器学习实验的工具包。 它可以自动进行获取超参、运行 Trial,测试结果,调优超参的循环。 在这里,将演示如何使用 NNI 帮助找到 MNIST 模型的最佳超参数。
这是还 **没有 NNI** 的示例代码,用 CNN MNIST 数据集上训练:
.. code-block:: python
def main(args):
# 下载数据
train_loader = torch.utils.data.DataLoader(datasets.MNIST(...), batch_size=args['batch_size'], shuffle=True)
test_loader = torch.tuils.data.DataLoader(datasets.MNIST(...), batch_size=1000, shuffle=True)
# 构建模型
model = Net(hidden_size=args['hidden_size'])
optimizer = optim.SGD(model.parameters(), lr=args['lr'], momentum=args['momentum'])
# 训练
for epoch in range(10):
train(args, model, device, train_loader, optimizer, epoch)
test_acc = test(args, model, device, test_loader)
print(test_acc)
print('final accuracy:', test_acc)
if __name__ == '__main__':
params = {
'batch_size': 32,
'hidden_size': 128,
'lr': 0.001,
'momentum': 0.5
}
main(params)
上面的代码一次只能尝试一组参数,如果想要调优学习率,需要手工改动超参,并一次次尝试。
NNI 用来帮助超参调优。它的流程如下:
.. code-block:: text
输入: 搜索空间, Trial 代码, 配置文件
输出: 一组最优的参数配置
1: For t = 0, 1, 2, ..., maxTrialNum,
2: hyperparameter = 从搜索空间选择一组参数
3: final result = run_trial_and_evaluate(hyperparameter)
4: 返回最终结果给 NNI
5: If 时间达到上限,
6: 停止实验
7: 返回最好的实验结果
.. note::
如果需要使用 NNI 来自动训练模型,找到最佳超参,有两种实现方式:
1. 编写配置文件,然后使用命令行启动 experiment
2. 直接从 Python 文件中配置并启动 experiment
在本节中,我们将重点介绍第一种实现方式。如果希望使用第二种实现方式,请参考 `教程 <HowToLaunchFromPython.rst>`__\
第一步:修改 ``Trial`` 代码
^^^^^^^^^^^^^^^^^^^^^^^^^^
修改 ``Trial`` 代码来从 NNI 获取超参,并向 NNI 报告训练结果。
.. code-block:: diff
+ import nni
def main(args):
# 下载数据
train_loader = torch.utils.data.DataLoader(datasets.MNIST(...), batch_size=args['batch_size'], shuffle=True)
test_loader = torch.tuils.data.DataLoader(datasets.MNIST(...), batch_size=1000, shuffle=True)
# 构造模型
model = Net(hidden_size=args['hidden_size'])
optimizer = optim.SGD(model.parameters(), lr=args['lr'], momentum=args['momentum'])
# 训练
for epoch in range(10):
train(args, model, device, train_loader, optimizer, epoch)
test_acc = test(args, model, device, test_loader)
- print(test_acc)
+ nni.report_intermeidate_result(test_acc)
- print('final accuracy:', test_acc)
+ nni.report_final_result(test_acc)
if __name__ == '__main__':
- params = {'batch_size': 32, 'hidden_size': 128, 'lr': 0.001, 'momentum': 0.5}
+ params = nni.get_next_parameter()
main(params)
*示例:* :githublink:`mnist.py <examples/trials/mnist-pytorch/mnist.py>`
第二步:定义搜索空间
^^^^^^^^^^^^^^^^^^^
编写 YAML 格式的 **搜索空间** 文件,包括所有需要搜索的超参的 **名称** **分布** (离散和连续值均可)。
.. code-block:: yaml
searchSpace:
batch_size:
_type: choice
_value: [16, 32, 64, 128]
hidden_size:
_type: choice
_value: [128, 256, 512, 1024]
lr:
_type: choice
_value: [0.0001, 0.001, 0.01, 0.1]
momentum:
_type: uniform
_value: [0, 1]
*示例:* :githublink:`config_detailed.yml <examples/trials/mnist-pytorch/config_detailed.yml>`
也可以使用 JSON 文件来编写搜索空间,并在配置中确认文件路径。关于如何编写搜索空间,可以参考 `教程 <SearchSpaceSpec.rst>`__.
第三步:配置 experiment
^^^^^^^^^^^^^^^^^^^^^^
除了在第二步中定义的搜索空间,还需要定义 YAML 格式的 **配置** 文件,声明 experiment 的关键信息,例如 Trail 文件,调优算法,最大 Trial 运行次数和最大持续时间等。
.. code-block:: yaml
experimentName: MNIST # 用于区分 experiment 的名字,可选项
trialCommand: python3 mnist.py # 注意:如果使用 Windows,请将 "python3" 修改为 "python"
trialConcurrency: 2 # 同时运行 2 trial
maxTrialNumber: 10 # 最多生成 10 trial
maxExperimentDuration: 1h # 1 小时后停止生成 trial
tuner: # 配置调优算法
name: TPE
classArgs: # 算法特定参数
optimize_mode: maximize
trainingService: # 配置训练平台
platform: local
Experiment 的配置文件可以参考 `文档 <../reference/experiment_config.rst>`__.
.. _nniignore:
.. Note:: 如果要使用远程服务器或集群作为 :doc:`训练平台 <../TrainingService/Overview>`,为了避免产生过大的网络压力,NNI 限制了文件的最大数量为 2000,大小为 300 MB 如果代码目录中包含了过多的文件,可添加 ``.nniignore`` 文件来排除部分,与 ``.gitignore`` 文件用法类似。 参考 `git documentation <https://git-scm.com/docs/gitignore#_pattern_format>`__ ,了解更多如何编写此文件的详细信息。
*示例:* :githublink:`config.yml <examples/trials/mnist-pytorch/config.yml>` :githublink:`.nniignore <examples/trials/mnist-pytorch/.nniignore>`
上面的代码都已准备好,并保存在 :githublink:`examples/trials/mnist-pytorch/ <examples/trials/mnist-pytorch>`
第四步:运行 experiment
^^^^^^^^^^^^^^^^^^^^^^
Linux macOS
**************
从命令行使用 **config.yml** 文件启动 MNIST experiment
.. code-block:: bash
nnictl create --config nni/examples/trials/mnist-pytorch/config_detailed.yml
Windows
*******
**config_detailed.yml** 文件的 ``trialCommand`` 项中将 ``python3`` 修改为 ``python``,然后从命令行使用 **config_detailed.yml** 文件启动 MNIST experiment
.. code-block:: bash
nnictl create --config nni\examples\trials\mnist-pytorch\config_detailed.yml
.. Note:: ``nnictl`` 是一个命令行工具,用来控制 NNI experiment,如启动、停止、继续 experiment,启动、停止 NNIBoard 等等。 点击 :doc:`这里 <Nnictl>` 查看 ``nnictl`` 的更多用法。
在命令行中等待输出 ``INFO: Successfully started experiment!`` 。 此消息表明实验已成功启动。 期望的输出如下:
.. code-block:: 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: [Your IP]: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
-----------------------------------------------------------------------
如果根据上述步骤准备好了相应 ``Trial`` **搜索空间** **配置** ,并成功创建的 NNI 任务。NNI 会自动开始通过配置的搜索空间来运行不同的超参集合,搜索最好的超参。 通过 Web 界面可看到 NNI 的进度。
第五步:查看 experiment
^^^^^^^^^^^^^^^^^^^^^^^^^^^
启动 experiment 后,可以在命令行界面找到如下的 **Web 界面地址**
.. code-block:: text
The Web UI urls are: [Your IP]:8080
在浏览器中打开 **Web 界面地址** (即: ``[IP 地址]:8080`` ),就可以看到 experiment 的详细信息,以及所有的 Trial 任务。 如果无法打开终端中的 Web 界面链接,可以参考 `常见问题 <FAQ.rst>`__
查看概要页面
******************
Experiment 相关信息会显示在界面上,包括配置和搜索空间等。 NNI 还支持通过 **Experiment summary** 按钮下载这些信息和参数。
.. image:: ../../img/webui-img/full-oview.png
:target: ../../img/webui-img/full-oview.png
:alt: overview
查看 Trial 详情页面
***********************
可以在此页面中看到最佳的 ``Trial`` 指标和超参数图。 您可以点击 ``Add/Remove columns`` 按钮向表格中添加更多列。
.. image:: ../../img/webui-img/full-detail.png
:target: ../../img/webui-img/full-detail.png
:alt: detail
查看 experiment 管理页面
***********************
``All experiments`` 页面可以查看计算机上的所有实验。
.. image:: ../../img/webui-img/managerExperimentList/expList.png
:target: ../../img/webui-img/managerExperimentList/expList.png
:alt: Experiments list
更多信息可参考 `此文档 <./WebUI.rst>`__
相关主题
-------------
* `进行Debug <HowToDebug.rst>`__
* `如何实现 Trial 代码 <../TrialExample/Trials.rst>`__
* `尝试不同的 Tuner <../Tuner/BuiltinTuner.rst>`__
* `尝试不同的 Assessor <../Assessor/BuiltinAssessor.rst>`__
* `在不同训练平台上运行 experiment <../training_services.rst>`__
* `如何使用 Annotation <AnnotationSpec.rst>`__
* `如何使用命令行工具 nnictl <Nnictl.rst>`__
* ` Web 界面中启动 TensorBoard <Tensorboard.rst>`__
../../en_US/Tutorial/SearchSpaceSpec.rst
\ No newline at end of file
../../en_US/Tutorial/SetupNniDeveloperEnvironment.rst
\ No newline at end of file
../../en_US/Tutorial/Tensorboard.rst
\ No newline at end of file
.. bb68c969dbc2b3a2ec79d323cbd31401
Web 界面
==================
Experiments 管理
-----------------------
点击导航栏上的 ``All experiments`` 标签。
.. image:: ../../img/webui-img/managerExperimentList/experimentListNav.png
:target: ../../img/webui-img/managerExperimentList/experimentListNav.png
:alt: ExperimentList nav
* 在 ``All experiments`` 页面,可以看到机器上的所有 Experiment。
.. image:: ../../img/webui-img/managerExperimentList/expList.png
:target: ../../img/webui-img/managerExperimentList/expList.png
:alt: Experiments list
* 查看 Experiment 更多详细信息时,可以单击 trial ID 跳转至该 Experiment 详情页,如下所示:
.. image:: ../../img/webui-img/managerExperimentList/toAnotherExp.png
:target: ../../img/webui-img/managerExperimentList/toAnotherExp.png
:alt: See this experiment detail
* 如果表格里有很多 Experiment,可以使用 ``filter`` 按钮。
.. image:: ../../img/webui-img/managerExperimentList/expFilter.png
:target: ../../img/webui-img/managerExperimentList/expFilter.png
:alt: filter button
查看概要页面
-----------------
点击 ``Overview`` 标签。
* 在 Overview 标签上,可看到 Experiment trial 的概况、搜索空间以及 ``top trials`` 的结果。
.. image:: ../../img/webui-img/full-oview.png
:target: ../../img/webui-img/full-oview.png
:alt: overview
如果想查看 Experiment 配置和搜索空间,点击右边的 ``Search space`` 和 ``Config`` 按钮。
1. 搜索空间文件:
.. image:: ../../img/webui-img/searchSpace.png
:target: ../../img/webui-img/searchSpace.png
:alt: searchSpace
2. 配置文件:
.. image:: ../../img/webui-img/config.png
:target: ../../img/webui-img/config.png
:alt: config
* 你可以在这里查看和下载 ``nni-manager/dispatcher 日志文件``。
.. image:: ../../img/webui-img/review-log.png
:target: ../../img/webui-img/review-log.png
:alt: logfile
* 如果 Experiment 包含了较多 Trial,可改变刷新间隔。
.. image:: ../../img/webui-img/refresh-interval.png
:target: ../../img/webui-img/refresh-interval.png
:alt: refresh
* 单击按钮 ``Experiment summary`` ,可以查看和下载 Experiment 结果(``Experiment 配置``,``trial 信息`` 和 ``中间结果`` )。
.. image:: ../../img/webui-img/summary.png
:target: ../../img/webui-img/summary.png
:alt: summary
* 在这里修改 Experiment 配置(例如 ``maxExecDuration``, ``maxTrialNum`` 和 ``trial concurrency``)。
.. image:: ../../img/webui-img/edit-experiment-param.png
:target: ../../img/webui-img/edit-experiment-param.png
:alt: editExperimentParams
* 通过单击 ``Learn about`` ,可以查看错误消息和 ``nni-manager/dispatcher 日志文件``
.. image:: ../../img/webui-img/experimentError.png
:target: ../../img/webui-img/experimentError.png
:alt: experimentError
* ``About`` 菜单内含有版本信息以及问题反馈渠道。
查看 trial 最终结果
----------------------------------------------
* ``Default metric`` 是所有 trial 的最终结果图。 在每一个结果上悬停鼠标可以看到 trial 信息,比如 trial id、No.、超参等。
.. image:: ../../img/webui-img/default-metric.png
:target: ../../img/webui-img/default-metric.png
:alt: defaultMetricGraph
* 打开 ``Optimization curve`` 来查看 Experiment 的优化曲线。
.. image:: ../../img/webui-img/best-curve.png
:target: ../../img/webui-img/best-curve.png
:alt: bestCurveGraph
查看超参
--------------------
单击 ``Hyper-parameter`` 标签查看平行坐标系图。
* 可以点击 ``添加/删除`` 按钮来添加或删减纵坐标轴。
* 直接在图上拖动轴线来交换轴线位置。
* 通过调节百分比来查看 top trial。
.. image:: ../../img/webui-img/hyperPara.png
:target: ../../img/webui-img/hyperPara.png
:alt: hyperParameterGraph
查看 Trial 运行时间
-------------------
点击 ``Trial Duration`` 标签来查看柱状图。
.. image:: ../../img/webui-img/trial_duration.png
:target: ../../img/webui-img/trial_duration.png
:alt: trialDurationGraph
查看 Trial 中间结果
------------------------------------
单击 ``Intermediate Result`` 标签查看折线图。
.. image:: ../../img/webui-img/trials_intermeidate.png
:target: ../../img/webui-img/trials_intermeidate.png
:alt: trialIntermediateGraph
Trial 在训练过程中可能有大量中间结果。 为了更清楚的理解一些 Trial 的趋势,可以为中间结果图设置过滤功能。
这样可以发现 Trial 在某个中间结果上会变得更好或更差。 这表明它是一个重要的并相关的中间结果。 如果要仔细查看这个点,可以在 #Intermediate 中输入其 X 坐标。 并输入这个中间结果的指标范围。 在下图中,选择了第四个中间结果并将指标范围设置为了 0.8 -1。
.. image:: ../../img/webui-img/filter-intermediate.png
:target: ../../img/webui-img/filter-intermediate.png
:alt: filterIntermediateGraph
查看 Trial 状态
------------------
点击 ``Trials Detail`` 标签查看所有 Trial 的状态。具体如下:
* Trial 详情:Trial id,持续时间,开始时间,结束时间,状态,精度和 search space 文件。
.. image:: ../../img/webui-img/detail-local.png
:target: ../../img/webui-img/detail-local.png
:alt: detailLocalImage
* 支持通过 id,状态,Trial 编号以及参数来搜索。
1. Trial id:
.. image:: ../../img/webui-img/detail/searchId.png
:target: ../../img/webui-img/detail/searchId.png
:alt: searchTrialId
2. Trial No.:
.. image:: ../../img/webui-img/detail/searchNo.png
:target: ../../img/webui-img/detail/searchNo.png
:alt: searchTrialNo.
3. Trial 状态:
.. image:: ../../img/webui-img/detail/searchStatus.png
:target: ../../img/webui-img/detail/searchStatus.png
:alt: searchStatus
4. Trial 参数:
(1) 类型为 choice 的参数:
.. image:: ../../img/webui-img/detail/searchParameterChoice.png
:target: ../../img/webui-img/detail/searchParameterChoice.png
:alt: searchParameterChoice
(2) 类型不是 choice 的参数:
.. image:: ../../img/webui-img/detail/searchParameterRange.png
:target: ../../img/webui-img/detail/searchParameterRange.png
:alt: searchParameterRange
* ``Add column`` 按钮可选择在表格中显示的列。 如果 Experiment 的最终结果是 dict,则可以在表格中查看其它键。可选择 ``Intermediate count`` 列来查看 Trial 进度。
.. image:: ../../img/webui-img/addColumn.png
:target: ../../img/webui-img/addColumn.png
:alt: addColumnGraph
* 如果要比较某些 Trial,可选择并点击 ``Compare`` 来查看结果。
.. image:: ../../img/webui-img/select-trial.png
:target: ../../img/webui-img/select-trial.png
:alt: selectTrialGraph
.. image:: ../../img/webui-img/compare.png
:target: ../../img/webui-img/compare.png
:alt: compareTrialsGraph
* ``Tensorboard`` 请参考 `此文档 <Tensorboard.rst>`__。
* 可使用 ``Copy as python`` 按钮来拷贝 Trial 的参数。
.. image:: ../../img/webui-img/copyParameter.png
:target: ../../img/webui-img/copyParameter.png
:alt: copyTrialParameters
* 您可以在 ``Log`` 选项卡上看到 Trial 日志。 在本地模式下有 ``View trial log``, ``View trial error`` 和 ``View trial stdout`` 三个按钮。 * 如果在 OpenPAI 或 Kubeflow 平台上运行,还可以看到 hdfsLog。
1. 本机模式
.. image:: ../../img/webui-img/detail/log-local.png
:target: ../../img/webui-img/detail/log-local.png
:alt: logOnLocal
2. OpenPAI、Kubeflow 等模式:
.. image:: ../../img/webui-img/detail-pai.png
:target: ../../img/webui-img/detail-pai.png
:alt: detailPai
* 中间结果图:可在此图中通过点击 intermediate 按钮来查看默认指标。
.. image:: ../../img/webui-img/intermediate.png
:target: ../../img/webui-img/intermediate.png
:alt: intermeidateGraph
* Kill: 可终止正在运行的任务。
.. image:: ../../img/webui-img/kill-running.png
:target: ../../img/webui-img/kill-running.png
:alt: killTrial
* 自定义 Trial:您可以更改此 Trial 参数,然后将其提交给 Experiment。如果您想重新运行失败的 Trial ,您可以向 Experiment 提交相同的参数。
.. image:: ../../img/webui-img/detail/customizedTrialButton.png
:target: ../../img/webui-img/detail/customizedTrialButton.png
:alt: customizedTrialButton
.. image:: ../../img/webui-img/detail/customizedTrial.png
:target: ../../img/webui-img/detail/customizedTrial.png
:alt: customizedTrial
../../en_US/Tutorial/python_api_connect.ipynb
\ No newline at end of file
../../en_US/Tutorial/python_api_start.ipynb
\ No newline at end of file
{% extends "!layout.html" %}
{% set title = "欢迎使用 Neural Network Intelligence !!!"%}
{% block document %}
<div>
<div class="chinese"><a href="https://nni.readthedocs.io/zh/stable/">English</a></div>
<b>NNI (Neural Network Intelligence)</b> 是一个轻量但强大的工具包,帮助用户<b>自动</b>的进行
<a href="{{ pathto('FeatureEngineering/Overview') }}">特征工程</a><a href="{{ pathto('NAS/Overview') }}">神经网络架构搜索</a><a href="{{ pathto('Tuner/BuiltinTuner') }}">超参调优</a>以及<a href="{{ pathto('Compression/Overview') }}">模型压缩</a>
</div>
<p class="topMargin">
NNI 管理自动机器学习 (AutoML) 的 Experiment,
<b>调度运行</b>
由调优算法生成的 Trial 任务来找到最好的神经网络架构和/或超参,支持
<b>各种训练环境</b>,如
<a href="{{ pathto('TrainingService/LocalMode') }}">本机</a>,
<a href="{{ pathto('TrainingService/RemoteMachineMode') }}">远程服务器</a>,
<a href="{{ pathto('TrainingService/PaiMode') }}">OpenPAI</a>,
<a href="{{ pathto('TrainingService/KubeflowMode') }}">Kubeflow</a>,
<a href="{{ pathto('TrainingService/FrameworkControllerMode') }}">基于 K8S 的 FrameworkController(如,AKS 等)</a>,
<a href="{{ pathto('TrainingService/DLTSMode') }}">DLWorkspace (又称 DLTS)</a>,
<a href="{{ pathto('TrainingService/AMLMode') }}">AML (Azure Machine Learning)</a>
以及其它云服务。
</p>
<!-- Who should consider using NNI -->
<div>
<h1 class="title">使用场景</h1>
<ul>
<li>想要在自己的代码、模型中试验<b>不同的自动机器学习算法</b></li>
<li>想要在<b>不同的环境中</b>加速运行自动机器学习。</li>
<li>想要更容易<b>实现或试验新的自动机器学习算法</b>的研究员或数据科学家,包括:超参调优算法,神经网络搜索算法以及模型压缩算法。
</li>
<li>在机器学习平台中<b>支持自动机器学习</b></li>
</ul>
</div>
<!-- nni release to version -->
<div class="inline">
<h3><a href="https://github.com/microsoft/nni/releases">NNI {{ release }} 已发布!</a></h3>
<img width="48" src="_static/img/release_icon.png">
</div>
<!-- NNI capabilities in a glance -->
<div>
<h1 class="title">NNI 功能一览</h1>
<p>
NNI 提供命令行工具以及友好的 WebUI 来管理训练的 Experiment。
通过可扩展的 API,可定制自动机器学习算法和训练平台。
为了方便新用户,NNI 内置了最新的自动机器学习算法,并为流行的训练平台提供了开箱即用的支持。
</p>
<p>
下表中,包含了 NNI 的功能,同时在不断地增添新功能,也非常希望您能贡献其中。
</p>
</div>
<p align="center">
<a href="#overview"><img src="_static/img/overview.svg" /></a>
</p>
<table class="list">
<tbody>
<tr align="center" valign="bottom" class="column">
<td></td>
<td class="framework">
<b>框架和库</b>
</td>
<td>
<b>算法</b>
</td>
<td>
<b>训练平台</b>
</td>
</tr>
</tr>
<tr>
<td class="verticalMiddle"><b>内置</b></td>
<td>
<ul class="firstUl">
<li><b>支持的框架</b></li>
<ul class="circle">
<li>PyTorch</li>
<li>Keras</li>
<li>TensorFlow</li>
<li>MXNet</li>
<li>Caffe2</li>
<a href="{{ pathto('SupportedFramework_Library') }}">更多...</a><br />
</ul>
</ul>
<ul class="firstUl">
<li><b>支持的库</b></li>
<ul class="circle">
<li>Scikit-learn</li>
<li>XGBoost</li>
<li>LightGBM</li>
<a href="{{ pathto('SupportedFramework_Library') }}">更多...</a><br />
</ul>
</ul>
<ul class="firstUl">
<li><b>示例</b></li>
<ul class="circle">
<li><a href="https://github.com/microsoft/nni/tree/master/examples/trials/mnist-pytorch">MNIST-pytorch</li>
</a>
<li><a href="https://github.com/microsoft/nni/tree/master/examples/trials/mnist-tfv2">MNIST-tensorflow</li>
</a>
<li><a href="https://github.com/microsoft/nni/tree/master/examples/trials/mnist-keras">MNIST-keras</li></a>
<li><a href="{{ pathto('TrialExample/GbdtExample') }}">Auto-gbdt</a></li>
<li><a href="{{ pathto('TrialExample/Cifar10Examples') }}">Cifar10-pytorch</li></a>
<li><a href="{{ pathto('TrialExample/SklearnExamples') }}">Scikit-learn</a></li>
<li><a href="{{ pathto('TrialExample/EfficientNet') }}">EfficientNet</a></li>
<li><a href="{{ pathto('TrialExample/OpEvoExamples') }}">GPU Kernel 调优</li></a>
<a href="{{ pathto('SupportedFramework_Library') }}">更多...</a><br />
</ul>
</ul>
</td>
<td align="left">
<a href="{{ pathto('Tuner/BuiltinTuner') }}">超参调优</a>
<ul class="firstUl">
<div><b>穷举搜索</b></div>
<ul class="circle">
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#Random">Random Search(随机搜索)</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#GridSearch">Grid Search(遍历搜索)</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#Batch">Batch(批处理)</a></li>
</ul>
<div><b>启发式搜索</b></div>
<ul class="circle">
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#Evolution">Naïve Evolution(朴素进化)</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#Anneal">Anneal(退火算法)</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#Hyperband">Hyperband</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#PBTTuner">P-DARTS</a></li>
</ul>
<div><b>贝叶斯优化</b></div>
<ul class="circle">
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#BOHB">BOHB</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#TPE">TPE</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#SMAC">SMAC</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#MetisTuner">Metis Tuner</a></li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#GPTuner">GP Tuner</a> </li>
<li><a href="{{ pathto('Tuner/BuiltinTuner') }}#DNGOTuner">PPO Tuner</a></li>
</ul>
</ul>
<a href="{{ pathto('NAS/Overview') }}">神经网络架构搜索</a>
<ul class="firstUl">
<ul class="circle">
<li><a href="{{ pathto('NAS/ENAS') }}">ENAS</a></li>
<li><a href="{{ pathto('NAS/DARTS') }}">DARTS</a></li>
<li><a href="{{ pathto('NAS/SPOS') }}">SPOS</a></li>
<li><a href="{{ pathto('NAS/Proxylessnas') }}">ProxylessNAS</a></li>
<li><a href="{{ pathto('NAS/FBNet') }}">微信</a></li>
<li><a href="{{ pathto('NAS/ExplorationStrategies') }}">基于强化学习</a></li>
<li><a href="{{ pathto('NAS/ExplorationStrategies') }}">Network Morphism</a></li>
<li><a href="{{ pathto('NAS/Overview') }}">TextNAS</a></li>
</ul>
</ul>
<a href="{{ pathto('Compression/Overview') }}">模型压缩</a>
<ul class="firstUl">
<div><b>剪枝</b></div>
<ul class="circle">
<li><a href="{{ pathto('Compression/Pruner') }}#agp-pruner">AGP Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#slim-pruner">Slim Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#fpgm-pruner">FPGM Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#netadapt-pruner">NetAdapt Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#simulatedannealing-pruner">SimulatedAnnealing Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#admm-pruner">ADMM Pruner</a></li>
<li><a href="{{ pathto('Compression/Pruner') }}#autocompress-pruner">AutoCompress Pruner</a></li>
<li><a href="{{ pathto('Compression/Overview') }}">更多...</a></li>
</ul>
<div><b>量化</b></div>
<ul class="circle">
<li><a href="{{ pathto('Compression/Quantizer') }}#qat-quantize">QAT Quantizer</a></li>
<li><a href="{{ pathto('Compression/Quantizer') }}#dorefa-quantizer">DoReFa Quantizer</a></li>
<li><a href="{{ pathto('Compression/Quantizer') }}#bnn-quantizer">BNN Quantizer</a></li>
</ul>
</ul>
<a href="{{ pathto('FeatureEngineering/Overview') }}">特征工程(测试版)</a>
<ul class="circle">
<li><a href="{{ pathto('FeatureEngineering/GradientFeatureSelector') }}">GradientFeatureSelector</a></li>
<li><a href="{{ pathto('FeatureEngineering/GBDTSelector') }}">GBDTSelector</a></li>
</ul>
<a href="{{ pathto('Assessor/BuiltinAssessor') }}">提前终止算法</a>
<ul class="circle">
<li><a href="{{ pathto('Assessor/BuiltinAssessor') }}#MedianStop">Median Stop(中位数终止)</a></li>
<li><a href="{{ pathto('Assessor/BuiltinAssessor') }}#Curvefitting">Curve Fitting(曲线拟合)</a></li>
</ul>
</td>
<td>
<ul class="firstUl">
<li><a href="{{ pathto('TrainingService/LocalMode') }}">本机</a></li>
<li><a href="{{ pathto('TrainingService/RemoteMachineMode') }}">远程计算机</a></li>
<li><a href="{{ pathto('TrainingService/HybridMode') }}">混合模式</a></li>
<li><a href="{{ pathto('TrainingService/AMLMode') }}">AML(Azure Machine Learning)</a></li>
<li><b>基于 Kubernetes 的平台</b></li>
<ul>
<li><a href="{{ pathto('TrainingService/PaiMode') }}">OpenPAI</a></li>
<li><a href="{{ pathto('TrainingService/KubeflowMode') }}">Kubeflow</a></li>
<li><a href="{{ pathto('TrainingService/FrameworkControllerMode') }}">基于 K8S 的 FrameworkController (如 AKS 等)</a></li>
<li><a href="{{ pathto('TrainingService/DLTSMode') }}">DLWorkspace (又称 DLTS)</a></li>
<li><a href="{{ pathto('TrainingService/AdaptDLMode') }}">AML (Azure Machine Learning)</a></li>
</ul>
</ul>
</td>
</tr>
<tr valign="top">
<td class="verticalMiddle"><b>参考</b></td>
<td>
<ul class="firstUl">
<li><a href="{{ pathto('Tutorial/HowToLaunchFromPython') }}">Python API</a></li>
<li><a href="{{ pathto('Tutorial/AnnotationSpec') }}">NNI Annotation</a></li>
<li><a href="{{ pathto('installation') }}">支持的操作系统</a></li>
</ul>
</td>
<td>
<ul class="firstUl">
<li><a href="{{ pathto('Tuner/CustomizeTuner') }}">自定义 Tuner</a></li>
<li><a href="{{ pathto('Assessor/CustomizeAssessor') }}">自定义 Assessor</a></li>
<li><a href="{{ pathto('Tutorial/InstallCustomizedAlgos') }}">安装自定义的 Tuner,Assessor,Advisor</a></li>
<li><a href="{{ pathto('NAS/QuickStart') }}">定义 NAS 模型空间</a></li>
<li><a href="{{ pathto('NAS/ApiReference') }}">NAS/Retiarii APIs</a></li>
</ul>
</td>
<td>
<ul class="firstUl">
<li><a href="{{ pathto('TrainingService/Overview') }}">支持训练平台</a></li>
<li><a href="{{ pathto('TrainingService/HowToImplementTrainingService') }}">实现训练平台</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<!-- Installation -->
<div>
<h1 class="title">安装</h1>
<div>
<h2 class="second-title">安装</h2>
<p>
NNI 支持并在 Ubuntu >= 16.04, macOS >= 10.14.1, 和 Windows 10 >= 1809 通过了测试。 在 <code>python 64-bit >= 3.6</code> 的环境中,只需要运行 <code>pip install</code> 即可完成安装。
</p>
<div class="command-intro">Linux 或 macOS</div>
<div class="command">python3 -m pip install --upgrade nni</div>
<div class="command-intro">Windows</div>
<div class="command">python -m pip install --upgrade nni</div>
<p class="topMargin">如果想要尝试最新代码,可通过源代码<a href="{{ pathto('installation') }}">安装
NNI</a>
</p>
<p>Linux 和 macOS 下 NNI 系统需求<a href="{{ pathto('Tutorial/InstallationLinux') }}">参考这里</a>,Windows <a href="{{ pathto('Tutorial/InstallationWin') }}">参考这里</a></p>
</div>
<div>
<p>注意:</p>
<ul>
<li>如果遇到任何权限问题,可添加 --user 在用户目录中安装 NNI。</li>
<li>目前,Windows 上的 NNI 支持本机,远程和 OpenPAI 模式。 强烈推荐使用 Anaconda 或 Miniconda <a href="{{ pathto('Tutorial/InstallationWin') }}">在 Windows 上安装 NNI</a></li>
<li>如果遇到如 Segmentation fault 这样的任何错误请参考 <a
href="{{ pathto('installation') }}">常见问题</a>。 Windows 上的常见问题,参考在 <a href="{{ pathto('Tutorial/InstallationWin') }}">Windows 上使用 NNI</a>。 Windows 上的常见问题,参考在 <a href="{{ pathto('Tutorial/InstallationWin') }}">Windows 上使用 NNI</a></li>
</ul>
</div>
<div>
<h2 class="second-title">验证安装</h2>
<p>
以下示例基于 TensorFlow 1.x 构建。 确保运行环境中使用的是 <b>TensorFlow 1.x</b>
</p>
<ul>
<li>
<p>通过克隆源代码下载示例。</p>
<div class="command">git clone -b {{ release }} https://github.com/Microsoft/nni.git</div>
</li>
<li>
<p>运行 MNIST 示例。</p>
<div class="command-intro">Linux 或 macOS</div>
<div class="command">nnictl create --config nni/examples/trials/mnist-tfv1/config.yml</div>
<div class="command-intro">Windows</div>
<div class="command">nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml</div>
</li>
<li>
<p>
在命令行中等待输出 INFO: Successfully started experiment!
此消息表明 Experiment 已成功启动。
通过命令行输出的 Web UI url 来访问 Experiment 的界面。
</p>
<!-- Indentation affects style! -->
<pre class="code">
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
-----------------------------------------------------------------------
</pre>
</li>
<li>
在浏览器中打开 Web UI 地址,可看到下图的 Experiment 详细信息,以及所有的 Trial 任务。 查看<a href="{{ pathto('Tutorial/WebUI') }}">这里的</a>更多页面示例。
<img src="_static/img/webui.gif" width="100%"/>
</div>
</li>
</ul>
</div>
<!-- Documentation -->
<div>
<h1 class="title">文档</h1>
<ul>
<li>要了解 NNI,请阅读 <a href="{{ pathto('Overview') }}">NNI 概述</a></li>
<li>要熟悉如何使用 NNI,请阅读<a href="{{ pathto('index') }}">文档</a></li>
<li>要安装 NNI,请参阅<a href="{{ pathto('installation') }}">安装 NNI</a></li>
</ul>
</div>
<!-- Contributing -->
<div>
<h1 class="title">贡献</h1>
<p>
本项目欢迎任何贡献和建议。 大多数贡献都需要你同意参与者许可协议(CLA),来声明你有权,并实际上授予我们有权使用你的贡献。
有关详细信息,请访问 <a href="https://cla.microsoft.com">https://cla.microsoft.com</a>
</p>
<p>
当你提交拉取请求时,CLA 机器人会自动检查你是否需要提供 CLA,并修饰这个拉取请求(例如,标签、注释)。 只需要按照机器人提供的说明进行操作即可。 CLA 只需要同意一次,就能应用到所有的代码仓库上。
</p>
<p>
该项目采用了 <a href="https://opensource.microsoft.com/codeofconduct/">Microsoft 开源行为准则 </a>。 有关详细信息,请参阅<a href="https://opensource.microsoft.com/codeofconduct/faq/">行为守则常见问题解答</a>或联系 <a
href="mailto:opencode@microsoft.com">opencode@microsoft.com</a> 咨询问题或评论。
</p>
<p>
熟悉贡献协议后,即可按照 NNI 开发人员教程,创建第一个 PR =) 了:
</p>
<ul>
<li>推荐新贡献者先从简单的问题开始:<a
href="https://github.com/Microsoft/nni/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22">'good first issue'</a><a
href="https://github.com/microsoft/nni/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22">'help-wanted'</a>
</li>
<li><a href="{{ pathto('Tutorial/SetupNniDeveloperEnvironment') }}">NNI 开发环境安装教程</a></li>
<li><a href="{{ pathto('Tutorial/HowToDebug') }}">如何调试</a></li>
<li>
如果有使用上的问题,可先查看<a href="{{ pathto('Tutorial/FAQ') }}">常见问题解答</a>。如果没能解决问题,可通过 <a
href="https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">Gitter</a>
联系 NNI 开发团队或在 GitHub 上<a href="https://github.com/microsoft/nni/issues/new/choose">报告问题</a>
</li>
<li><a href="{{ pathto('Tuner/CustomizeTuner') }}">自定义 Tuner</a></li>
<li><a href="{{ pathto('TrainingService/HowToImplementTrainingService') }}">实现定制的训练平台</a>
</li>
<li><a href="{{ pathto('NAS/Advanced') }}">在 NNI 上实现新的 NAS Trainer</a></li>
<li><a href="{{ pathto('Tuner/CustomizeAdvisor') }}">自定义 Advisor</a></li>
</ul>
</div>
<!-- External Repositories and References -->
<div>
<h1 class="title">其它代码库和参考</h1>
<p>经作者许可的一些 NNI 用法示例和相关文档。</p>
<ul>
<h2>外部代码库</h2>
<li>在 NNI 中运行 <a href="{{ pathto('NAS/ENAS') }}">ENAS</a></li>
<li>
https://github.com/microsoft/nni/blob/master/examples/feature_engineering/auto-feature-engineering/README_zh_CN.md
</li>
<li>使用 NNI 的 <a
href="https://github.com/microsoft/recommenders/blob/master/examples/04_model_select_and_optimize/nni_surprise_svd.ipynb">矩阵分解超参调优</a></li>
<li><a href="https://github.com/ksachdeva/scikit-nni">scikit-nni</a> 使用 NNI 为 scikit-learn 开发的超参搜索。</li>
</ul>
<!-- Relevant Articles -->
<ul>
<h2>相关文章</h2>
<li><a href="{{ pathto('CommunitySharings/HpoComparison') }}">超参数优化的对比</a></li>
<li><a href="{{ pathto('CommunitySharings/NasComparison') }}">神经网络结构搜索的对比</a></li>
<li><a href="{{ pathto('CommunitySharings/ParallelizingTpeSearch') }}">并行化顺序算法:TPE</a>
</li>
<li><a href="{{ pathto('CommunitySharings/RecommendersSvd') }}">使用 NNI 为 SVD 自动调参</a></li>
<li><a href="{{ pathto('CommunitySharings/SptagAutoTune') }}">使用 NNI 为 SPTAG 自动调参</a></li>
<li><a
href="https://towardsdatascience.com/find-thy-hyper-parameters-for-scikit-learn-pipelines-using-microsoft-nni-f1015b1224c1">
使用 NNI 为 scikit-learn 查找超参
</a></li>
<li>
<strong>博客</strong> - <a
href="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">AutoML 工具(Advisor,NNI 与 Google Vizier)的对比</a> 作者:@gaocegege - kubeflow/katib 的设计与实现的总结与分析章节
</li>
<li>
Blog (中文) - <a href="https://mp.weixin.qq.com/s/7_KRT-rRojQbNuJzkjFMuA">NNI 2019 新功能汇总</a> by @squirrelsc
</li>
</ul>
</div>
<!-- feedback -->
<div>
<h1 class="title">反馈</h1>
<ul>
<li><a href="https://github.com/microsoft/nni/issues/new/choose">在 GitHub 上提交问题</a></li>
<li><a
href="https://stackoverflow.com/questions/tagged/nni?sort=Newest&edited=true">Stack Overflow</a> 上使用 nni 标签提问。
</li>
<li><a
href="https://gitter.im/Microsoft/nni?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">Gitter</a> 中参与讨论。</li>
</ul>
<div>
<div>加入聊天组:</div>
<table border=1 style="border-collapse: collapse;">
<tbody>
<tr style="line-height: 30px;">
<th>Gitter</th>
<td></td>
<th>微信</th>
</tr>
<tr>
<td class="QR">
<img src="https://user-images.githubusercontent.com/39592018/80665738-e0574a80-8acc-11ea-91bc-0836dc4cbf89.png" alt="Gitter" />
</td>
<td width="80" align="center" class="or"></td>
<td class="QR">
<img src="https://github.com/scarlett2018/nniutil/raw/master/wechat.png" alt="NNI 微信" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Related Projects -->
<div>
<h1 class="title">相关项目</h1>
<p>
以探索先进技术和开放为目标,<a href="https://www.microsoft.com/zh-cn/research/group/systems-and-networking-research-group-asia/">Microsoft Research (MSR)</a> 还发布了一些相关的开源项目。</p>
<ul id="relatedProject">
<li>
<a href="https://github.com/Microsoft/pai">OpenPAI</a>:作为开源平台,提供了完整的 AI 模型训练和资源管理能力,能轻松扩展,并支持各种规模的私有部署、云和混合环境。
</li>
<li>
<a href="https://github.com/Microsoft/frameworkcontroller">FrameworkController</a>:开源的通用 Kubernetes Pod 控制器,通过单个控制器来编排 Kubernetes 上所有类型的应用。
</li>
<li>
<a href="https://github.com/Microsoft/MMdnn">MMdnn</a>:一个完整、跨框架的解决方案,能够转换、可视化、诊断深度神经网络模型。 MMdnn 中的 "MM" 表示 model management(模型管理),而 "dnn" 是 deep neural network(深度神经网络)的缩写。
</li>
<li>
<a href="https://github.com/Microsoft/SPTAG">SPTAG</a> : Space Partition Tree And Graph (SPTAG) 是用于大规模向量的最近邻搜索场景的开源库。
</li>
</ul>
<p>我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。</p>
</div>
<!-- License -->
<div>
<h1 class="title">许可协议</h1>
<p>代码库遵循 <a href="https://github.com/microsoft/nni/blob/master/LICENSE">MIT 许可协议</a></p>
</div>
</div>
{% endblock %}
../../en_US/_templates/layout.html
\ No newline at end of file
../../en_US/_templates/nnSpider.html
\ No newline at end of file
../../../en_US/_templates/nnSpider/comfort.html
\ No newline at end of file
../../../en_US/_templates/nnSpider/crying.html
\ No newline at end of file
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