Modellstadier

Introduktion till MLflow

Weston Bassler

Senior MLOps Engineer

Mjukvarumiljöer

Diagram över utvecklings-, staging- och produktionsmiljöer

Introduktion till MLflow

MLflow-modellstadier

  • Tilldelas modellversioner
  • Fördefinierade stadier:

    • None
    • Staging
    • Production
    • Archived
  • Ett stadium i taget

Introduktion till MLflow

Fördefinierade stadier

Fördefinierade stadier

Introduktion till MLflow

None

Stadiet None

Introduktion till MLflow

Staging

Stadiet Staging

Introduktion till MLflow

Production

Stadiet Production

Introduktion till MLflow

Archived

Stadiet Archived

Introduktion till MLflow

Övergång mellan stadier

transition-ui

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

# Transition to Staging client.transition_model_version_stage( name="Unicorn", version=3, stage="Staging" )
Introduktion till MLflow

Övergång till Staging för modellversion

# Transition to Staging
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>
Introduktion till MLflow

Registrets användargränssnitt

staging-ui

Introduktion till MLflow

Övergång till Production

# Transition to 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>
Introduktion till MLflow

Nu kör vi en övning!

Introduktion till MLflow

Preparing Video For Download...