iT邦幫忙

2021 iThome 鐵人賽

DAY 7
1
AI & Data

新手一起來Azure上玩 NNI (auto-ML的一種)系列 第 7

NNI安裝後的驗證01

上回我們安裝完成後,如何確認安裝的正確性呢?當然是下載實驗樣本來炸炸看。

首先,請先建一個子目錄。
其次,複製一份含原始碼的範例(最新版為 v2.4):

git clone -b v2.4 https://github.com/Microsoft/nni.git

修改設定檔

  • 請先進入子目錄 -- nni\examples\trials\mnist-pytorch
  • 打開設定檔 -- config_detailed.yml,註釋部分說明得很清楚。
  • 大略瀏覽一下第11行開始的 searchSpace ,感受一下。
  • 第25行,trialCommand: python3 mnist.py。python3 改為 python,因為Windows之故。
  • 第26行,trialCodeDirectory: . 。
  • 第27行,trialGpuNumber: 0,因為沒安裝NVIDIA GPU,所以CUDA數為0。
  • 第37行,optimize_mode: maximize。
  • 第42行,platform: local。因在本機執行。

開始執行MNIST範例

當修改檢查完 config_detail.yml 設定檔後。執行時要求WebUI在 port 8085作為進出埠,以免可能和現有的Web服務相衝突,如ASP.NET or Office等。可自行從IIS管理員的站台查看。

nnictl create --config config_detailed.yml -p 8085

若您有照著順序無誤的進行,恭喜您,一定會看到以下的訊息:(注意Web UI urls)

INFO:  Starting restful server...
INFO:  Successfully started Restful server!
INFO:  Starting experiment...
INFO:  Successfully started experiment!
------------------------------------------------------------------------------------
The experiment id is w6RM9AfU
The Web UI urls are: http://192.168.1.5:8085   http://172.26.32.1:8085   http://127.0.0.1:8085
------------------------------------------------------------------------------------

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
------------------------------------------------------------------------------------
Command reference document https://nni.readthedocs.io/en/latest/Tutorial/Nnictl.html
------------------------------------------------------------------------------------

我們已指定port為8085,所以,請在瀏覽器網址,輸入 127.0.0.1:8085,進入WebUI管理介面。此時,您將會很開心的看到管理介面。
若不幸發生錯誤,請將所有的 experiments關閉。再慢慢除錯。

 nnictl stop --all

欲知後事如何,請看下回分解。


上一篇
NNI安裝在本機(Windows版)
下一篇
NNI安裝後的驗證02
系列文
新手一起來Azure上玩 NNI (auto-ML的一種)30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言