Member-only story
Troubleshooting MLflow Tracking Errors: Run Not Found Issue
Introduction
MLflow is a powerful tool for managing machine learning experiments, model tracking, and deployments. However, users often encounter errors related to missing runs, such as:
mlflow.exceptions.MlflowException: Run '7c47b4545b3248fa80465c02ca5781c9' not found
This issue can arise when trying to retrieve, deploy, or interact with an MLflow-tracked run that does not exist or is inaccessible. This article explores the possible causes and solutions.
Understanding the Issue
In MLflow, each experiment run is assigned a unique run ID. When executing commands such as:
export MLFLOW_TRACKING_URI=http://mlflow.example.com:8080
mlflow models build-docker -m runs:/7c47b4545b3248fa80465c02ca5781c9/random_forest_model -n lucab85/bank-churn-api --enable-mlserver
The error may occur if MLflow is unable to locate the specified run.
Common Causes and Solutions
1. Run ID Does Not Exist
Cause: The provided run ID may not exist in the MLflow tracking store.
Solution: Verify the run ID using the following Python script:
import mlflow
from mlflow.tracking import MlflowClient
client = MlflowClient()
experiments = client.list_experiments()
for experiment in experiments:
runs =…