DevOps (Software):
Code → Build → Test → Deploy → Monitor
✅ Deterministic (cùng code → cùng output)
MLOps (Machine Learning):
Data + Code + Config → Train → Evaluate → Deploy → Monitor
❌ Non-deterministic (cùng code, khác data → khác model)
❌ Data dependency (model phụ thuộc vào data quality)
❌ Model decay (model giảm chất lượng theo thời gian)
主要區別:
開發營運
MLOps
神器
二進位/容器
模型+資料+配置
測試
單元測試、整合
+ 資料驗證、模型驗證
CI/CD
代碼變更
+ 資料變更、模型再訓練
監控
正常運作時間、延遲
+ 資料漂移、模型效能
版本控制
程式碼 (Git)
+ 資料 + 模型 + 管道
再現性
簡單
非常困難(隨機種子、GPU...)
3. MLOps 成熟度模型
0 級:無 MLOps(手動)
Đặc điểm:
❌ Jupyter Notebook → Manual deploy
❌ Không track experiments
❌ Không monitoring
❌ Retrain = "ai đó nhớ thì làm"
Team:
1 Data Scientist làm hết
Phù hợp: POC, hackathon
第 1 級:DevOps,但還不是 MLOps
Đặc điểm:
✅ Code trên Git
✅ CI/CD pipeline
✅ Automated testing (unit tests)
❌ Chưa track data versions
❌ Chưa track experiments
❌ Manual retraining
Team:
DS + ML Engineer
Phù hợp: Startup giai đoạn đầu
第 2 級:機器學習管道自動化
Đặc điểm:
✅ Automated training pipeline
✅ Experiment tracking (MLflow)
✅ Data versioning (DVC)
✅ Model registry
✅ Feature store
⚠️ Manual trigger retraining
Team:
DS + ML Engineer + Data Engineer
Phù hợp: Công ty có 5-10 ML models
第 3 級:機器學習的 CI/CD
Đặc điểm:
✅ Automated retraining (trigger by data/schedule)
✅ A/B testing, canary deployment
✅ Model validation pipeline
✅ Monitoring + alerting
✅ Feature store shared
Team:
DS + ML Engineer + Data Engineer + ML Platform
Phù hợp: Công ty scale (>10 models)
第 4 級:完整 MLOps
Đặc điểm:
✅ Self-healing pipelines
✅ Auto-retrain on drift detection
✅ Multi-model management
✅ Cost optimization
✅ Governance & compliance
Team:
Full ML Platform team
Phù hợp: Big Tech, AI-first companies
4. ML 中的技術債務
Google's "Hidden Technical Debt in ML Systems" (NeurIPS 2015):
┌────────────────────────────────────────────┐
│ ML System │
│ ┌────────────────────────────────────┐ │
│ │ ML Code (~5%) │ │
│ └────────────────────────────────────┘ │
│ ┌────┬─────┬──────┬──────┬────┬──────┐ │
│ │Data│Data │Feat. │Config│Serv│Monit.│ │
│ │Col.│Veri.│Extr. │ │ing │oring │ │
│ └────┴─────┴──────┴──────┴────┴──────┘ │
│ (~95% non-ML code) │
└────────────────────────────────────────────┘
ML Code chỉ chiếm ~5% tổng hệ thống!
技術債類型:
# 1. Data Dependency Debt
# Input data thay đổi → model hỏng
# VD: Feature từ API bên thứ 3 bị đổi format
# 2. Configuration Debt
# Hyperparams, feature flags, thresholds... không tracked
# VD: Ai đổi threshold từ 0.5 → 0.7? Khi nào?
# 3. Pipeline Debt
# Glue code nối các bước → fragile
# VD: Script bash + cron job + manual copy file
# 4. Reproducibility Debt
# Không thể reproduce kết quả cũ
# VD: "Model v2 tốt hơn v1" — nhưng không reproduce được v1