Tags: Integration, Data, Metrics, Intermediate

The MLflow Tracking component is an API and UI for logging parameters, code versions, metrics, and output files when running your machine learning code and for later visualizing the results

First, install the Flyte MLflow plugin:

pip install flytekitplugins-mlflow

To log the metrics and parameters to Flyte deck, add @mlflow_autolog to the task. For example

def train_model(epochs: int):

To log the metric and parameters to a remote mlflow server, add default environment variable MLFLOW_TRACKING_URI to the flytepropeller config map.

kubectl edit cm flyte-propeller-config
    default-cpus: 100m
    - MLFLOW_TRACKING_URI: postgresql+psycopg2://postgres:@postgres.flyte.svc.cluster.local:5432/flyteadmin
MLflow UI