Étapes du modèle

Introduction à MLflow

Weston Bassler

Senior MLOps Engineer

Environnements logiciels

Schéma des environnements de développement, d'essai et de production

Introduction à MLflow

Étapes de modèle MLflow

  • Attribuées aux versions de modèle
  • Étapes prédéfinies :

    • Aucune
    • Essai
    • Production
    • Archivé
  • Une seule étape à la fois

Introduction à MLflow

Étapes prédéfinies

Étapes prédéfinies

Introduction à MLflow

Aucune

Étape Aucune

Introduction à MLflow

Essai

Étape Essai

Introduction à MLflow

Production

Étape Production

Introduction à MLflow

Archivé

Étape Archivé

Introduction à MLflow

Faire passer les modèles d'une étape à l'autre

interface de transition

# Import MLFlow Client
from mlflow import MlflowClient
client = MlflowClient()

# Transition vers Essai client.transition_model_version_stage( name="Unicorn", version=3, stage="Staging" )
Introduction à MLflow

Passer une version à l'étape d'essai

# Transition vers Essai
client.transition_model_version_stage(name="Unicorn", version=3, stage="Staging")
<ModelVersion: creation_timestamp=1679693470034, current_stage='Staging', 
description=None, last_updated_timestamp=1679699050734, name='Unicorn', 
run_id='a1454f2865e449f8835f38f71e53e547', run_link=None, 
source='./mlruns/1/a1454f2865e449f8835f38f71e53e547/artifacts/model', 
status='READY', status_message=None, tags={}, user_id=None, version=3>
Introduction à MLflow

Interface du registre

interface du registre

Introduction à MLflow

Passer à la production

# Transition vers Production
client.transition_model_version_stage(name="Unicorn", version=3, 
                                      stage="Production")
<ModelVersion: creation_timestamp=1679693470034, current_stage='Production', 
description=None, last_updated_timestamp=1679699633297, name='Unicorn', 
run_id='a1454f2865e449f8835f38f71e53e547', run_link=None, 
source='./mlruns/1/a1454f2865e449f8835f38f71e53e547/artifacts/model', 
status='READY', status_message=None, tags={}, user_id=None, version=3>
Introduction à MLflow

Passons à la pratique !

Introduction à MLflow

Preparing Video For Download...