Published August 4, 2023

MLflow - Part 1 - Fundamentals


MLfLow is an open-source platform for managing workflows and artifacts in the entire machine learning lifecycle.

Table of content

  1. Example
    1. Installation


In this example a ML project is going to be created using the benefits of MLflow.

Installation of MLflow

Create conda environment

conda create  --name mlflow_fundamentals

Actvate environment

conda activate mlflow_fundamentals

Install Mlflow

conda install -c conda-forge mlflow


import mlflow

from sklearn.model_selection import train_test_split
from sklearn.datasets import load_diabetes
from sklearn.ensemble import RandomForestRegressor


db = load_diabetes()
X_train, X_test, y_train, y_test = train_test_split(,

# Create and train models.
rf = RandomForestRegressor(n_estimators=100, max_depth=6, max_features=3), y_train)

# Use the model to make predictions on the test dataset.
predictions = rf.predict(X_test)

Run MLflow ui

mlflow ui

Check http://localhost:5000 to review the runners.


Previous Post: Softmax