Робочі процеси

Вступ до MLflow

Weston Bassler

Senior MLOps Engieer

MLflow Projects

Робочий процес

1 unsplash.com
Вступ до 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
Вступ до MLflow

Робочі процеси

import mlflow

# Крок 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

# Крок 2 step_2 = mlflow.projects.run( uri='./', entry_point='step_2' )
Вступ до MLflow

Запуск Projects

import mlflow

# Крок 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

print(step_1)
<mlflow.projects.submitted_run.LocalSubmittedRun object at 0x125eac8b0>
Вступ до MLflow

Запуск Projects

step_1.cancel() - Terminate a current run

step_1.get_status() - Get the status of a run

step_1.run_id - run_id of the run

step_1.wait() - Wait for the run to finish

Вступ до MLflow

Запуск Projects

import mlflow

# Крок 1
step_1 = mlflow.projects.run(
    uri='./',
    entry_point='step_1'
)

# Задайте змінну для step_1 run_id step_1_run_id = step_1.run_id
# Крок 2
step_2 = mlflow.projects.run(
    uri='./',
    entry_point='step_2',

parameters={ 'run_id': step_1_run_id }
)
Вступ до MLflow

Життєвий цикл ML

Інженерія моделі та оцінювання моделі

Вступ до MLflow

Давайте потренуємось!

Вступ до MLflow

Preparing Video For Download...