Skip to content

Latest commit

 

History

History
202 lines (148 loc) · 4.83 KB

File metadata and controls

202 lines (148 loc) · 4.83 KB

MLflow Complete Tutorial - Getting Started

Welcome to the MLflow Complete Tutorial! This tutorial will guide you through all four core components of MLflow in a practical, hands-on manner.

🎯 What You'll Learn

This tutorial covers all four MLflow components:

  1. MLflow Tracking - Track experiments, parameters, metrics, and artifacts
  2. MLflow Projects - Package ML code in a reproducible format
  3. MLflow Models - Package models for deployment
  4. MLflow Model Registry - Manage model versions and lifecycle

⚡ Quick Start (3 Steps)

Step 1: Install Dependencies

# Using the setup script (recommended)
./setup.sh

# OR manually
pip install -r requirements.txt

Step 2: Run the Tutorial

# 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

Step 3: View Results

# In a separate terminal, start MLflow UI
mlflow ui

# Then open in browser: http://localhost:5000

📚 Documentation

  • README.md - Complete detailed documentation
  • QUICKSTART.md - Quick start guide with commands
  • PROJECT_SUMMARY.md - Overview of what each component demonstrates

🔍 Before You Start

Verify your setup:

python verify_setup.py

This will check:

  • ✓ Python version
  • ✓ Required packages
  • ✓ Tutorial files

📋 Tutorial Components

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

🎓 Learning Path

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

🛠️ What's Included

Tutorial Files

  • 1_tracking.py - MLflow Tracking examples
  • 2_projects.py - MLflow Projects examples
  • 3_models.py - MLflow Models examples
  • 4_model_registry.py - Model Registry examples
  • run_all.py - Master script to run all components

Utilities

  • utils.py - Shared utility functions
  • verify_setup.py - Setup verification script
  • setup.sh - Automated setup script

Configuration

  • MLproject - MLflow project configuration
  • python_env.yaml - Python environment specification
  • requirements.txt - Python dependencies
  • .gitignore - Git ignore rules

Documentation

  • README.md - Main documentation
  • QUICKSTART.md - Quick start guide
  • PROJECT_SUMMARY.md - Project overview
  • INDEX.md - This file

💡 Key Features

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

🚀 Common Commands

# 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 main

📊 What You'll Create

After 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

🎯 Next Steps After Tutorial

  1. Explore the UI - Browse experiments and models
  2. Modify the code - Experiment with different parameters
  3. Use your data - Replace synthetic data with real datasets
  4. Integrate MLflow - Add to your existing projects
  5. Deploy models - Try model serving and deployment

📖 Additional Resources

🆘 Need Help?

  1. Check README.md for detailed documentation
  2. Review QUICKSTART.md for quick reference
  3. Run python verify_setup.py to check setup
  4. See PROJECT_SUMMARY.md for overview

🎉 Ready to Start?

# 1. Setup
./setup.sh

# 2. Run
python run_all.py

# 3. View (in separate terminal)
mlflow ui

Happy Learning! 🚀

Start with python run_all.py to see the complete workflow in action!