Workflows

Introductie tot MLflow

Weston Bassler

Senior MLOps Engieer

MLflow-projecten

Workflow

1 unsplash.com
Introductie tot 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
Introductie tot MLflow

Workflows

import mlflow

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

# Stap 2 step_2 = mlflow.projects.run( uri='./', entry_point='step_2' )
Introductie tot MLflow

Projectruns

import mlflow

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

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

Projectruns

step_1.cancel() - Beëindig een lopende run

step_1.get_status() - Haal de status op

step_1.run_id - run_id van de run

step_1.wait() - Wacht tot de run klaar is

Introductie tot MLflow

Projectruns

import mlflow

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

# Variabele voor step_1 run_id step_1_run_id = step_1.run_id
# Stap 2
step_2 = mlflow.projects.run(
    uri='./',
    entry_point='step_2',

parameters={ 'run_id': step_1_run_id }
)
Introductie tot MLflow

ML-levenscyclus

Modelengineering en -evaluatie

Introductie tot MLflow

Laten we oefenen!

Introductie tot MLflow

Preparing Video For Download...