1 Star 0 Fork 0

somefusion / nni

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT


MIT 许可证 生成状态 问题 Bug 拉取请求 版本 进入 https://gitter.im/Microsoft/nni 聊天室提问 文档状态

English

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

NNI v1.0 已发布!  

支持的框架和库 调优算法 训练平台
内置
  • 支持的框架
    • PyTorch
    • Keras
    • TensorFlow
    • MXNet
    • Caffe2
    • 更多...
  • 支持的库
Tuner(调参器) Assessor(评估器)
参考

使用场景

  • 在本机尝试使用不同的自动机器学习(AutoML)算法来训练模型。
  • 在分布式环境中加速自动机器学习(如:远程 GPU 工作站和云服务器)。
  • 定制自动机器学习算法,或比较不同的自动机器学习算法。
  • 在机器学习平台中支持自动机器学习。

相关项目

以开发和先进技术为目标,Microsoft Research (MSR) 发布了一些开源项目。

  • OpenPAI:作为开源平台,提供了完整的 AI 模型训练和资源管理能力,能轻松扩展,并支持各种规模的私有部署、云和混合环境。
  • FrameworkController:开源的通用 Kubernetes Pod 控制器,通过单个控制器来编排 Kubernetes 上所有类型的应用。
  • MMdnn:一个完整、跨框架的解决方案,能够转换、可视化、诊断深度神经网络模型。 MMdnn 中的 "MM" 表示model management(模型管理),而 "dnn" 是 deep neural network(深度神经网络)的缩写。
  • SPTAG : Space Partition Tree And Graph (SPTAG) 是用于大规模向量的最近邻搜索场景的开源库。

我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。

安装和验证

通过 pip 命令安装

  • 当前支持 Linux,MacOS 和 Windows(本机,远程,OpenPAI 模式),在 Ubuntu 16.04 或更高版本,MacOS 10.14.1 以及 Windows 10.1809 上进行了测试。 在 python >= 3.5 的环境中,只需要运行 pip install 即可完成安装。

Linux 和 macOS

python3 -m pip install --upgrade nni

Windows

python -m pip install --upgrade nni

注意:

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

通过源代码安装

  • 当前支持 Linux(Ubuntu 16.04 或更高版本),MacOS(10.14.1)以及 Windows 10(1809 版)。

Linux 和 macOS

  • python >= 3.5 的环境中运行命令: gitwget,确保安装了这两个组件。
    git clone -b v1.0 https://github.com/Microsoft/nni.git
    cd nni
    source install.sh

Windows

  • python >=3.5 的环境中运行命令: gitPowerShell,确保安装了这两个组件。
  git clone -b v1.0 https://github.com/Microsoft/nni.git
  cd nni
  powershell -ExecutionPolicy Bypass -file install.ps1

参考安装 NNI 了解系统需求。

Windows 上参考 Windows 上使用 NNI

验证安装

以下示例 Experiment 依赖于 TensorFlow 。 在运行前确保安装了 TensorFlow

  • 通过克隆源代码下载示例。
    git clone -b v1.0 https://github.com/Microsoft/nni.git

Linux 和 macOS

  • 运行 MNIST 示例。
    nnictl create --config nni/examples/trials/mnist/config.yml

Windows

  • 运行 MNIST 示例。
    nnictl create --config nni\examples\trials\mnist\config_windows.yml
  • 在命令行中等待输出 INFO: Successfully started experiment!。 此消息表明 Experiment 已成功启动。 通过命令行输出的 Web UI url 来访问 Experiment 的界面。
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 任务。 查看这里的更多页面。
drawing drawing

文档

主要文档都可以在这里找到,文档均从本代码库生成。
点击阅读:

入门

教程

贡献

非常欢迎通过各种方式参与此项目,例如:

在编写代码前,可以先看看贡献指南来了解更多信息。 此外,还提供了以下文档:

其它代码库和参考

经作者许可的一些 NNI 用法示例和相关文档。

反馈

许可协议

代码库遵循 MIT 许可协议

MIT License Copyright (c) Microsoft Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

简介

An open source AutoML toolkit for neural architecture search and hyper-parameter tuning. 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/somefusion/nni.git
git@gitee.com:somefusion/nni.git
somefusion
nni
nni
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891