NNI(神经网络智能)是一个帮助用户运行自动机器学习(AutoML)实验的工具包。该工具调度并运行由优化算法生成的试验作业,以在不同的环境(如本地机器、远程服务器和云)中搜索最佳的神经体系结构和/或超参数。
项目地址:https://github.com/Microsoft/nni
文档:https://microsoft.github.io/nni/
(相关链接请点击文末阅读原文访问)
python3 -m pip install --user --upgrade nni
如果你在docker 容器环境中(以root用户的身份),请从上述安装命令中删除 --user
如有任何错误,例如分割错误,请参考FAQ
现阶段我们支持Linux(Ubuntu 16.04或更高版本)、MacOS(10.14.1)
在安装了python 3.5或以上版本、git 和 wget 的环境中运行以下命令:
git clone -b v0.4.1 https://github.com/Microsoft/nni.git
cd nni
source install.sh
有关NNI的系统要求,请参考 安装 NNI
验证安装
以下示例是在TensorFlow上构建的实验。 请确保在运行之前安装了TensorFlow。
git clone -b v0.4.1 https://github.com/Microsoft/nni.git
nnictl create --config nni/examples/trials/mnist/config.yml
等待命令行中的消息 INFO: Successfully started experiment! 这表明试验已经成功启动。你可以用 Web UI url 浏览这个试验。
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 log stderr show stderr log content
4. nnictl log stdout show stdout log content
5. nnictl stop stop an experiment
6. nnictl trial kill kill a trial job by id
7. nnictl --help get help information about nnictl
-----------------------------------------------------------------------
在浏览器中打开 Web UI url,您可以查看实验的详细信息和所有提交的试验作业,如下所示。这里有更多的Web UI页面。
怎么做
本项目欢迎贡献和建议,我们使用GitHub问题来跟踪请求和错误。
我们希望新贡献者提出的好的新问题应该是简单并且易于启动的。
要为NNI开发设置环境,请参阅说明:设置NNI开发人员环境
在开始编码之前,请查看并熟悉NNI代码贡献指南:贡献
我们正在构建如何调试的指导,也欢迎您在此方面提出问题或建议。
整个代码库都在MIT许可之下
项目地址:https://github.com/Microsoft/nni
文档:https://microsoft.github.io/nni/