Module 14: MLOps Basics
Learn to manage the complete ML lifecycle with MLOps practices.
What You'll Learn
- Version Control for ML (DVC, MLflow)
- CI/CD for ML
- Experiment Tracking
- Model Registry
- Reproducibility
- Best Practices
Topics Covered
1. Version Control for ML
- Git: Code versioning
- DVC (Data Version Control): Version data and models
- Track datasets
- Reproduce experiments
- Share data efficiently
- Git LFS: Large file storage
- Best Practices: What to version
2. Experiment Tracking
- MLflow: Open-source platform
- Tracking experiments
- Logging parameters and metrics
- Comparing runs
- Weights & Biases: Beautiful UI
- TensorBoard: TensorFlow visualization
- What to Track: Hyperparameters, metrics, artifacts
3. Model Registry
- Model Versioning: Track model versions
- Model Lineage: Track model history
- Staging: Dev → Staging → Production
- MLflow Model Registry: Centralized model management
4. CI/CD for ML
- Continuous Integration: Test code changes
- Continuous Deployment: Automate deployment
- Testing: Unit tests, integration tests
- GitHub Actions: CI/CD pipelines
- ML-specific CI/CD: Data validation, model testing
5. Reproducibility
- Environment Management: Conda, Docker
- Random Seeds: Reproducible results
- Data Versioning: Same data = same results
- Code Versioning: Track code changes
- Documentation: Document everything
6. Data Pipeline
- ETL/ELT: Extract, Transform, Load
- Data Validation: Great Expectations
- Feature Stores: Manage features
- Data Lineage: Track data flow
Learning Objectives
By the end of this module, you should be able to:
- Version control ML projects
- Track experiments effectively
- Set up CI/CD pipelines
- Manage model registry
- Ensure reproducibility
Projects
- MLflow Setup: Track experiments with MLflow
- DVC Pipeline: Create reproducible pipeline
- CI/CD Pipeline: Automate testing and deployment
- Model Registry: Manage model versions
Hands-on lab checklist (minimum for interviews)
Complete these in order after reading the main guide. Each should produce a GitHub artifact.
| # | Lab | Deliverable | Guide section / resource |
|---|---|---|---|
| 1 | Log 3 sklearn runs in MLflow (params + metrics + artifact) | mlruns/ or remote tracking URI screenshot |
mlops.md experiment tracking |
| 2 | Version a dataset with DVC add + push (or local remote) |
dvc.yaml + .dvc file in repo |
DVC docs + module project tutorial |
| 3 | Register one model in MLflow Model Registry (Staging) | Registry screenshot or API call log | Model registry section |
| 4 | GitHub Actions: run pytest on PR (even one trivial test) |
Green CI badge or workflow log | CI/CD section |
| 5 | Dockerize a training script from Module 13 | Dockerfile + docker build success |
deployment.md + docker_tutorial.md |
Stretch: Wire W&B or Great Expectations on the same project, links in mlops-advanced-topics.md.
Key Concepts
- Reproducibility: Same inputs = same outputs
- Experiment Tracking: Learn from past experiments
- Version Control: Track everything (code, data, models)
- Automation: Reduce manual work
- Collaboration: Work effectively in teams
Documentation & Learning Resources
Official Documentation:
Free Courses:
- MLOps Specialization (Coursera): Free audit available
- Full Stack Deep Learning: Free course on production ML
- MLOps Course (YouTube): Free course
Tutorials:
- MLflow Tutorial
- DVC Tutorial
- MLOps Guide: Comprehensive guide
- Experiment Tracking Guide
- MLflow Guide: Hyperparameter tuning, model registry, and deployment
Video Tutorials:
Tools & Platforms:
- MLflow: Open-source ML lifecycle platform
- DVC: Data version control
- Weights & Biases: Experiment tracking
- Neptune.ai: ML experiment management
- Kubeflow: ML toolkit for Kubernetes
Best Practices:
Additional Resources:
- Advanced Topics →: Advanced tracking, feature stores, monitoring, automation
- Project Tutorial →: Step-by-step MLOps pipeline setup
- Quick Reference →: Quick lookup guide for MLOps
Previous Module: 13-model-deployment
Next Module: 15-time-series-analysis or 16-projects-beginner