Alur kerja

Pengantar MLflow

Weston Bassler

Senior MLOps Engieer

MLflow Projects

Alur kerja

1 unsplash.com
Pengantar MLflow

MLproject

name: project_name
python_env: python_env.yaml
entry_points:

step_1: command: "python train_model.py"
step_2: command: "python evaluate_model.py {run_id}" parameters: run_id: type: str default: None
Pengantar MLflow

Alur kerja

import mlflow

# Step 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

# Step 2 step_2 = mlflow.projects.run( uri='./', entry_point='step_2' )
Pengantar MLflow

Menjalankan Projects

import mlflow

# Step 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

print(step_1)
<mlflow.projects.submitted_run.LocalSubmittedRun object at 0x125eac8b0>
Pengantar MLflow

Menjalankan Projects

step_1.cancel() - Menghentikan run saat ini

step_1.get_status() - Mendapatkan status run

step_1.run_id - run_id dari run

step_1.wait() - Menunggu run selesai

Pengantar MLflow

Menjalankan Projects

import mlflow

# Step 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

# Set variabel untuk run_id step_1 step_1_run_id = step_1.run_id
# Step 2
step_2 = mlflow.projects.run(
    uri='./',
    entry_point='step_2',

parameters={ 'run_id': step_1_run_id }
)
Pengantar MLflow

Siklus Hidup ML

Rekayasa Model dan Evaluasi Model

Pengantar MLflow

Ayo berlatih!

Pengantar MLflow

Preparing Video For Download...