Етапи моделі

Вступ до MLflow

Weston Bassler

Senior MLOps Engineer

Програмні середовища

Схема середовищ development, staging і production

Вступ до MLflow

Етапи моделі в MLflow

  • Призначаються версіям моделі
  • Попередньо визначені етапи:

    • None
    • Staging
    • Production
    • Archived
  • Лише один етап одночасно

Вступ до MLflow

Попередньо визначені етапи

Попередньо визначені етапи

Вступ до MLflow

None

Етап None

Вступ до MLflow

Staging

Етап Staging

Вступ до MLflow

Production

Етап Production

Вступ до MLflow

Archived

Етап Archived

Вступ до MLflow

Переведення моделей між етапами

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" )
Вступ до MLflow

Переведення версії моделі на staging

# 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>
Вступ до MLflow

Інтерфейс реєстру

інтерфейс staging

Вступ до MLflow

Перехід у 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>
Вступ до MLflow

Давайте потренуємось!

Вступ до MLflow

Preparing Video For Download...