Welcome to the MLflow Complete Tutorial! This tutorial will guide you through all four core components of MLflow in a practical, hands-on manner.
This tutorial covers all four MLflow components:
- MLflow Tracking - Track experiments, parameters, metrics, and artifacts
- MLflow Projects - Package ML code in a reproducible format
- MLflow Models - Package models for deployment
- MLflow Model Registry - Manage model versions and lifecycle
# Using the setup script (recommended)
./setup.sh
# OR manually
pip install -r requirements.txt# Run all components in sequence (recommended for first time)
python run_all.py
# OR run individual components
python 1_tracking.py
python 2_projects.py
python 3_models.py
python 4_model_registry.py# In a separate terminal, start MLflow UI
mlflow ui
# Then open in browser: http://localhost:5000- README.md - Complete detailed documentation
- QUICKSTART.md - Quick start guide with commands
- PROJECT_SUMMARY.md - Overview of what each component demonstrates
Verify your setup:
python verify_setup.pyThis will check:
- ✓ Python version
- ✓ Required packages
- ✓ Tutorial files
| Component | File | Duration | Description |
|---|---|---|---|
| 1. Tracking | 1_tracking.py |
2-3 min | Log experiments, metrics, and artifacts |
| 2. Projects | 2_projects.py |
3-4 min | Create reproducible ML projects |
| 3. Models | 3_models.py |
2-3 min | Package models for deployment |
| 4. Registry | 4_model_registry.py |
2-3 min | Manage model versions and lifecycle |
Total Time: 15-25 minutes
Start Here
↓
Install Dependencies (setup.sh)
↓
Verify Setup (verify_setup.py)
↓
Component 1: Tracking (1_tracking.py)
↓
Component 2: Projects (2_projects.py)
↓
Component 3: Models (3_models.py)
↓
Component 4: Registry (4_model_registry.py)
↓
Explore MLflow UI (mlflow ui)
↓
Experiment & Customize
1_tracking.py- MLflow Tracking examples2_projects.py- MLflow Projects examples3_models.py- MLflow Models examples4_model_registry.py- Model Registry examplesrun_all.py- Master script to run all components
utils.py- Shared utility functionsverify_setup.py- Setup verification scriptsetup.sh- Automated setup script
MLproject- MLflow project configurationpython_env.yaml- Python environment specificationrequirements.txt- Python dependencies.gitignore- Git ignore rules
README.md- Main documentationQUICKSTART.md- Quick start guidePROJECT_SUMMARY.md- Project overviewINDEX.md- This file
✅ Modular Design - Each component is independent
✅ Self-Contained - No external data required
✅ Well-Documented - Extensive comments and docs
✅ Production-Ready - Real-world patterns and practices
✅ Beginner-Friendly - Step-by-step progression
✅ Hands-On - Learn by doing
# Run all tutorials
python run_all.py
# Run specific component
python 1_tracking.py
# Verify setup
python verify_setup.py
# Start MLflow UI
mlflow ui
# Run via MLflow Projects
mlflow run . -e mainAfter completing the tutorial:
- 15+ experiments with multiple runs
- 100+ logged metrics and parameters
- 3 registered model versions
- Multiple artifacts (plots, models, reports)
- Complete understanding of MLflow workflow
- Explore the UI - Browse experiments and models
- Modify the code - Experiment with different parameters
- Use your data - Replace synthetic data with real datasets
- Integrate MLflow - Add to your existing projects
- Deploy models - Try model serving and deployment
- Check README.md for detailed documentation
- Review QUICKSTART.md for quick reference
- Run
python verify_setup.pyto check setup - See PROJECT_SUMMARY.md for overview
# 1. Setup
./setup.sh
# 2. Run
python run_all.py
# 3. View (in separate terminal)
mlflow uiHappy Learning! 🚀
Start with python run_all.py to see the complete workflow in action!