服务器创建tensorflow环境,nni自动调参记录

一、anaconda安装记录

1.1 下载安装脚本:
wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh

1.2 运行安装向导:
bash Anaconda3-5.2.0-Linux-x86_64.sh

1.3 确认是否安装成功:
conda --version

这个版本的Anaconda3-5.2.0-Linux-x86_64.sh,在vscode连接网络时出错,换了个版本成功。

conda --version未成功,anaconda: command not found

二、修改bashrc文件

1、使用命令:sudo apt install vim 安装vim文本编辑器
2、使用命令:vim ~/.bashrc 修改环境变量

3、在文本最后添加命令:export PATH=~/anaconda3/bin:$PATH

4、重启环境变量:source ~/.bashrc

anaconda安装成功

 三、tensorflow安装

conda create --name tensorflow python=3.5
source activate tensorflow

四、NNI安装和demo运行

  • 当前支持 Linux 和 MacOS。测试并支持的版本包括:Ubuntu 16.04 及更高版本,MacOS 10.14.1。 在 python >= 3.5 的环境中,只需要运行 pip install 即可完成安装。
    python3 -m pip install --upgrade nni
  • 通过克隆源代码下载示例。
    git clone -b v0.5.1 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 任务。 查看这里的更多页面示例。

 

 

 
 
 
 
 

 

转载于:https://www.cnblogs.com/smartwhite/p/10385136.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值