Microsoft Learn AI 技能挑戰賽
實戰 3: MLOps
Alan Tsai
微軟最有價值專家 – Azure (Microsoft MVP)
微軟認證講師 – (Microsoft Certified Trainer)
https://to.alantsai.net/azml-mlops
簡單的自我介紹
 Alan Tsai
 蔡孟玹
• 後端工程師
• Study4.TW 社群成員
• 翻譯文章/軟體
• 2 本翻譯書
• 看小說
聯絡我
 Alan Tsai 的學習筆記
 https://blog.alantsai.net
• FB粉絲頁
• http://fb.alantsai.net
• Youtube
• http://yt.alantsai.net
http://bilibili.alantsai.net/
如何申請微軟學生大使和微軟最有價值專家
https://studentambassadors.microsoft.com/ https://mvp.microsoft.com/
Agenda
 從學習環境到正式環境
 何謂 MLOps
 為什麼需要 MLOps
 使用 Github Codespace + Github Action + Azure Machine Learning
 MLOps 的全貌是什麼
什麼是 MLOps
Machine Learning 101
Machine Learning
lifecycle
Test /
Evaluate
Build & Train
ML model
file
(Trained)
Prepare Data, Build and Train an ML model Run/consume the ML model in app
Run /
Predict
?
Web apps /
Services
Mobile
apps
Desktop
apps
Bots
IoT
Historic
Data
Learning != Production
Machine Learning
lifecycle
Test /
Evaluate
Build & Train
ML model
file
(Trained)
Prepare Data, Build and Train an ML model Run/consume the ML model in app
Run /
Predict
?
Web apps /
Services
Mobile
apps
Desktop
apps
Bots
IoT
Historic
Data
機器不
夠好
沒那麼
大的空
間
Model
怎麼提
供出來?
Azure Machine Learning
接下來的 Demo 涵蓋什麼
 建立環境
 建立開發的環境 – Github Codespace
 用來跑完整 Machine Learning 的環境 – Azure Machine Learning
 透過 Python SDK 和 Azure Machine Learning 互動
 透過 Azure CLI 建立 Service Principle
 透過 Jupyter Notebook 建立 Azure Machine Learning 相關功能
https://github.com/alantsai/tutorial-AzureML-MLOps-codespace
Demo – 你就是那條龍
建立 Azure ML 和透過 Jupyter Notebook 來建立 Job
看似很美好,問題是什麼?
 機器管理面
 如果要改運算配置怎麼辦?
 誰要去執行?
 開發面
 如果要改資料來源怎麼辦?
 怎麼知道目前上面的版本和我的 Notebook 有沒有一樣?
 資安面
 如果原始碼洩露怎麼辦?
多人作業的時候怎麼辦?
從軟體開發借鑒
Wikipedia DevOps
MLOps
DevOps and MLOps
一樣的概念只是呈現不同
Machine learning model solution
一樣的概念只是呈現不同
Explore the solution architecture
一樣的概念只是呈現不同 – 搭配角色
GigaOm-Delivering on the Vision of MLOps
Demo 的內容
Explore the solution architecture
Github Repo Github Action
Data Scientist
Data Engineer
ML Engineer
Demo 的內容
 說明 Github Action (Workflow)的內容
 設定 Github Action Secrets
 Commit 程式碼自動觸發 Github Action
Demo – 從此以後只需要專注想專注的事情
改成用 Github Action 來觸發整個 Model 建制
同前一個 Demo 有什麼不一樣?
 程式碼和執行的可以對應的起來
 不在要擔心誰去觸發執行的問題
 各個角色只需要專注自己在乎的地方
 不在會有有洩露機敏資訊的可能
完整的 MLOps 會是什麼樣子
Azure Machine Learning Classical ML Architecture
MLOps with Azure Machine Learning
參考資料
MLOps Challenge
參考資料
 Microsoft Learn AI Challenge
 https://www.facebook.com/alantsai.blog/posts/764517812345446
 Bilibili 回放
https://space.bilibili.com/483888821/channel/collectiondetail?sid=1536665
 Youtube 回放
https://www.youtube.com/playlist?list=PL5S9BJ3mvUsKAIsmoGk3PF_l5ivan2O8f
Q and A

Microsoft Learn AI 挑戰賽-實戰三 MLOps | Alan Tsai