MLflow’a Giriş
Weston Bassler
Senior MLOps Engineer
Model Sürümleri
İşbirliği

# Mevcut MLflow Modelleri
mlflow.register_model(model_uri, name)
model_uri
# Eğitim çalışması sırasında
mlflow.FLAVOR.log_model(name,
artifact_uri,
registered_model_name="MODEL_NAME")
registered_model_name="MODEL_NAME"
# mlflow'u içe aktar import mlflow# Yerel dosya sisteminden modeli kaydet mlflow.register_model("./model", "Unicorn")# Tracking sunucusundan modeli kaydet mlflow.register_model("runs:/run-id/model", "Unicorn")
# Yerel MLFlow Modelini kaydet
mlflow.register_model(model_uri="./model", name="Unicorn")
Kayıtlı 'Unicorn' modeli zaten var. Bu modelin yeni bir sürümü oluşturuluyor...2023/03/24 14:34:26 INFO mlflow.tracking._model_registry.client: Model sürümü oluşturmanın bitmesi için en fazla 300 saniye bekleniyor. Model adı: Unicorn, sürüm 1 'Unicorn' modelinin '1' sürümü oluşturuldu. <ModelVersion: creation_timestamp=1679682866413, current_stage='None', description=None, last_updated_timestamp=1679682866413, name='Unicorn', run_id=None, run_link=None, source='./model', status='READY', status_message=None, tags={}, user_id=None, version=1>
# MLflow Tracking'den modeli kaydet
mlflow.register_model(model_uri="runs:/run-id/model", name="Unicorn")
Kayıtlı 'Unicorn' modeli zaten var. Bu modelin yeni bir sürümü oluşturuluyor...
2023/03/24 14:36:56 INFO mlflow.tracking._model_registry.client:
Model sürümü oluşturmanın bitmesi için en fazla 300 saniye bekleniyor.
Model adı: Unicorn, sürüm 2
'Unicorn' modelinin '2' sürümü oluşturuldu.
<ModelVersion: creation_timestamp=1679683016297, current_stage='None',
description=None, last_updated_timestamp=1679683016297, name='Unicorn',
run_id='2e974508b68b45ceb114657c6e97fef5', run_link=None,
source='./mlruns/1/2e974508b68b45ceb114657c6e97fef5/artifacts/model',
status='READY', status_message=None, tags={}, user_id=None, version=2>


# Modülleri içe aktar import mlflow import mlflow.sklearn from sklearn.linear_model import LogisticRegression# Model lr = LogisticRegression() lr.fit(X, y)# Modeli logla mlflow.sklearn.log_model(lr, "model", registered_model_name="Unicorn")
# Modeli logla
mlflow.sklearn.log_model(lr, "model", registered_model_name="Unicorn")
Kayıtlı 'Unicorn' modeli zaten var. Bu modelin yeni bir sürümü oluşturuluyor...
2023/03/24 17:31:10 INFO mlflow.tracking._model_registry.client:
Model sürümü oluşturmanın bitmesi için en fazla 300 saniye bekleniyor.
Model adı: Unicorn, sürüm 3
'Unicorn' modelinin '3' sürümü oluşturuldu.
<mlflow.models.model.ModelInfo object at 0x14734d330>
MLflow’a Giriş