NNI 正在参加 2021 年度 OSC 中国开源项目评选,请投票支持!
NNI 在 2021 年度 OSC 中国开源项目评选 中已获得 {{ projectVoteCount }} 票,请投票支持!
2021 年度 OSC 中国开源项目评选 正在火热进行中,快来投票支持你喜欢的开源项目!
2021 年度 OSC 中国开源项目评选 >>> 中场回顾
NNI 获得 2021 年度 OSC 中国开源项目评选「最佳人气项目」 !
授权协议 MIT
开发语言 Python TypeScript
操作系统 跨平台
软件类型 开源软件
开源组织 微软
地区 不详
投 递 者 红薯
适用人群 未知
收录时间 2019-05-12

软件简介

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

支持的框架 调优算法 训练服务
  • PyTorch
  • TensorFlow
  • Keras
  • MXNet
  • Caffe2
  • CNTK (Python 语言)
  • Chainer
  • Theano
Tuner(调参器) Assessor(评估器)

使用场景

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

相关项目

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

  • OpenPAI:作为开源平台,提供了完整的 AI 模型训练和资源管理能力,能轻松扩展,并支持各种规模的私有部署、云和混合环境。
  • FrameworkController:开源的通用 Kubernetes Pod 控制器,通过单个控制器来编排 Kubernetes 上所有类型的应用。
  • MMdnn:一个完整、跨框架的解决方案,能够转换、可视化、诊断深度神经网络模型。 MMdnn 中的 "MM" 表示model management(模型管理),而 "dnn" 是 deep neural network(深度神经网络)的缩写。 我们鼓励研究人员和学生利用这些项目来加速 AI 开发和研究。

安装和验证

通过 pip 命令安装

  • 当前支持 Linux 和 MacOS。测试并支持的版本包括:Ubuntu 16.04 及更高版本,MacOS 10.14.1。 在 python >= 3.5的环境中,只需要运行 pip install 即可完成安装。
    python3 -m pip install --upgrade nni

注意:

  • 如果需要将 NNI 安装到自己的 home 目录中,可使用 --user,这样也不需要任何特殊权限。
  • 如果遇到如Segmentation fault 这样的任何错误请参考常见问题

通过源代码安装

  • 当前支持 Linux(Ubuntu 16.04 及更高版本) 和 MacOS(10.14.1)。
  • 在 python >= 3.5 的环境中运行命令: git 和 wget,确保安装了这两个组件。
    git clone -b v0.6 https://github.com/Microsoft/nni.git
    cd nni  
    source install.sh   

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

验证安装

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

  • 通过克隆源代码下载示例。
    git clone -b v0.6 https://github.com/Microsoft/nni.git
  • 运行 mnist 示例。
    nnictl create --config nni/examples/trials/mnist/config.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
展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击加入讨论🔥(1) 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
1 评论
45 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部