Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 629 Bytes

step-1-experiment-tracking.md

File metadata and controls

47 lines (29 loc) · 629 Bytes

Step 1: Experiment tracking

Install MLflow

$ pip install mlflow

Import MLflow

import mlflow  

Define the MLflow tracking server and experiment

MLFLOW_TRACKING_SERVER = "http://localhost:5000"
MLFLOW_EXPERIMENT = "ames-housing"

Configure MLflow

mlflow.set_tracking_uri(MLFLOW_TRACKING_SERVER)
mlflow.set_experiment(MLFLOW_EXPERIMENT)

Enable autologging

mlflow.sklearn.autolog()

Wrap fit() and score()

with mlflow.start_run():
    pipeline.fit(train_input, train_output)
    pipeline.score(test_input, test_output)