• nni 环境搭建


    1. 创建虚拟环境

    conda create -n nni python=3.7
    conda activate nni
    

    2. 安装nni

    pip install nni==1.9 tensorflow==1.15.4  # 需要手动安装tf 1.x
    git clone -b v1.9 https://gitee.com/oaksharks/nni.git  # 需要源码运行样例
    

    3. 遇到的问题

    启动任务时候遇到报错:

    internal/modules/cjs/loader.js:883
      throw err;
      ^
    
    Error: Cannot find module '/home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node'
    Require stack:
    - /home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/sqlite3-binding.js
    - /home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/sqlite3.js
    - /home/oaksharks/miniconda3/envs/nni/nni/core/sqlDatabase.js
    - /home/oaksharks/miniconda3/envs/nni/nni/main.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
        at Function.Module._load (internal/modules/cjs/loader.js:725:27)
        at Module.require (internal/modules/cjs/loader.js:952:19)
        at require (internal/modules/cjs/helpers.js:88:18)
        at Object.<anonymous> (/home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
        at Module._compile (internal/modules/cjs/loader.js:1063:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
        at Module.load (internal/modules/cjs/loader.js:928:32)
        at Function.Module._load (internal/modules/cjs/loader.js:769:14)
        at Module.require (internal/modules/cjs/loader.js:952:19) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/sqlite3-binding.js',
        '/home/oaksharks/miniconda3/envs/nni/nni/node_modules/sqlite3/lib/sqlite3.js',
        '/home/oaksharks/miniconda3/envs/nni/nni/core/sqlDatabase.js',
        '/home/oaksharks/miniconda3/envs/nni/nni/main.js'
      ]
    }
    
    

    解决办法:

    $ cd /home/oaksharks/miniconda3/envs/nni/nni/node_modules
    yarn install
    

    4. 启动实验

    nnictl create --port 8480 --config nni/examples/trials/mnist-tfv1/config.yml
    # nnictl experiment show # 查看执行中的任务
    # nnictl stop # 关闭运行中的任务
    
  • 相关阅读:
    elementplus 按需引入将英文组件修改为中文
    vue3动态组件的展示
    vue3中的四种插槽的介绍保证让你看看的明明白白!
    发福利了!!!团队机器人每日分享最新漏洞验证脚本数据库文件分享!
    selenium 获取token
    7个开源交易撮合引擎
    【Anyhow】错误向下转型
    【Axum】全局 404 处理
    【Axum】获取查询参数
    【Axum】修改返回状态码
  • 原文地址:https://www.cnblogs.com/oaks/p/13960607.html
Copyright © 2020-2023  润新知