모델 단계

MLflow 소개

Weston Bassler

Senior MLOps Engineer

소프트웨어 환경

개발, 스테이징, 프로덕션 환경 다이어그램

MLflow 소개

MLflow 모델 단계

  • 모델 버전에 할당됨
  • 사전 정의 단계:

    • None
    • Staging
    • Production
    • Archived
  • 한 번에 하나의 단계만

MLflow 소개

사전 정의 단계

사전 정의된 단계

MLflow 소개

None

None 단계

MLflow 소개

Staging

Staging 단계

MLflow 소개

프로덕션

프로덕션 단계

MLflow 소개

보관됨

보관됨 단계

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 소개

모델 버전 스테이징 전환

# 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 소개

레지스트리 UI

staging-ui

MLflow 소개

프로덕션으로 전환

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