What is MLflow?

Introduction to MLflow

Weston Bassler

Senior MLOps Engineer

The machine learning lifecycle

ml-lifecycle

1 datacamp.com
Introduction to MLflow

Difficulties of machine learning

  • Tracking:
    • Models and model metrics
  • Reproducibility:
    • Platforms, environments and workspaces
  • Deployment:
    • So many options and no standards
Introduction to MLflow

What is MLflow?

mlflow

"An open source platform for the machine learning lifecycle" - MLflow.org

1 www.mlflow.org
Introduction to MLflow

Components of MLflow

  • MLflow Tracking:
    • Record metrics and parameters from training runs
    • Query data from experiments
    • Store models, artifacts and code
  • MLflow Models:
    • Standardize models for deployment
    • Build customized models
  • Model Registry:
    • Store and version ML models
    • Load and deploy ML models
  • MLflow Projects:
    • Package ML code for reproducibility
    • Package ML code for repeatability
Introduction to MLflow

integrations

1 www.mlflow.org
Introduction to MLflow

MLflow experiments

experiment-ui

Introduction to MLflow

Working with experiments

MLflow Client

  • Create Experiments
    client.create_experiment("Name")
    
  • Tag Experiments
    client.set_experiment_tag("Name", 
    k, v)
    
  • Delete Experiments
    client.delete_experiment("Name")
    

MLflow module

  • Create Experiments
    mlflow.create_experiment("Name")
    
  • Tag Experiments
    mlflow.set_experiment_tag(k, v)
    
  • Delete Experiments

    mlflow.delete_experiment("Name")
    
  • Set Experiment

    mlflow.set_experiment("Name")
    
Introduction to MLflow

Starting a new experiment

import mlflow

# Create new Experiment mlflow.create_experiment("My Experiment")
# Tag new experiment mlflow.set_experiment_tag("scikit-learn", "lr")
# Set the experiment mlflow.set_experiment("My Experiment")
Introduction to MLflow

Let's practice!

Introduction to MLflow

Preparing Video For Download...