Introductie tot MLflow Model Registry

Introductie tot MLflow

Weston Bassler

Senior MLOps Engineer

Modellevenscyclus

Diagram van development, staging

Introductie tot MLflow

MLflow Model Registry

  • Gecentraliseerde opslaglocatie

  • Lifecyclebeheer

    • Web-UI
    • MLflow Client-module
    • Modelversies
    • Modelstages

model-registry

Introductie tot MLflow

MLflow Model Registry

  • Model

    • Model gelogd in MLflow Tracking
  • Geregistreerd model

    • Krijgt een versie
    • Kan een stage krijgen
Introductie tot MLflow

MLflow Model Registry

  • Modelversie

    • Verhoogt bij elke nieuwe registratie
  • Modelstage

    • Mogelijke waarden:
      • None
      • Staging
      • Production
      • Archived

Stages

Introductie tot MLflow

Werken met de Model Registry

Modellen

Introductie tot MLflow

MLflow Client-module

  • Experiments

  • Runs

  • Model Versions

  • Registered Models

Machine Learning

1 Flaticon.com
Introductie tot MLflow

MLflow client-module gebruiken

# Import from MLflow module
from mlflow import MlflowClient


# Create an instance client = MlflowClient()
# Print the object client
<mlflow.tracking.client.MlflowClient object at 0x101d55f30>
Introductie tot MLflow

Een model registreren

# Create a Model named "Unicorn"
client.create_registered_model(name="Unicorn")
<RegisteredModel: creation_timestamp=1679404160448, description=None, 
last_updated_timestamp=1679404160448, latest_versions=[], name='Unicorn', 
tags={}>
Introductie tot MLflow

Model-UI

create-model

Introductie tot MLflow

Geregistreerde modellen zoeken

modellen zoeken

Introductie tot MLflow

Geregistreerde modellen zoeken

# Search for registered models
client.search_registered_models(filter_string=MY_FILTER_STRING)
  • Identifiers
    • name - of the model
    • tags - tags associated with model
  • Comparators
    • = - equal to
    • != - not equal to
    • LIKE - case-sensitive pattern match
    • ILIKE - case-insensitive pattern match
Introductie tot MLflow

Voorbeeldzoekopdracht

# Filter string
unicorn_filter_string = "name LIKE 'Unicorn%'"


# Search models client.search_registered_models(filter_string=unicorn_filter_string)
[<RegisteredModel: creation_timestamp=1679404160448, description=None, 
last_updated_timestamp=1679404160448, latest_versions=[], name='Unicorn', 
tags={}>, 
<RegisteredModel: creation_timestamp=1679404276745, description=None, 
last_updated_timestamp=1679404276745, latest_versions=[], name='Unicorn 2.0', 
tags={}>]
Introductie tot MLflow

Laten we oefenen!

Introductie tot MLflow

Preparing Video For Download...