ขั้นตอนของโมเดล

MLflow เบื้องต้น

Weston Bassler

Senior MLOps Engineer

Software environments

ไดอะแกรมแสดง environment สำหรับการพัฒนา การทดสอบ และการใช้งานจริง

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 เบื้องต้น

Registry UI

staging-ui

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...