High severity intermediate · Fix: 5-10 min

MlflowException

mlflow.exceptions.MlflowException

What this error means
MLflow raises MlflowException when the specified model registry or model name is not found or accessible in the configured tracking server.

Stack trace

traceback
mlflow.exceptions.MlflowException: Model registry not found: 'my_model'
  File "/usr/local/lib/python3.9/site-packages/mlflow/tracking/client.py", line 123, in get_registered_model
    raise MlflowException(f"Model registry not found: '{name}'")
QUICK FIX
Set the correct MLflow tracking URI and verify the registered model name exists before calling get_registered_model.

Why it happens

This error occurs when MLflow's client attempts to access a registered model that does not exist in the configured tracking server or the model registry is not properly set up. It can also happen if the tracking URI is misconfigured or the user lacks permissions.

Detection

Catch MlflowException when calling get_registered_model or related registry APIs and log the model name and tracking URI to detect missing or misconfigured registries before crashing.

Causes & fixes

1

The specified registered model name does not exist in the MLflow tracking server.

✓ Fix

Verify the model name spelling and ensure the model is registered in the MLflow tracking server before accessing it.

2

MLflow tracking URI is not set or points to the wrong server without the model registry.

✓ Fix

Set the correct MLflow tracking URI using mlflow.set_tracking_uri() or environment variable MLFLOW_TRACKING_URI to point to the server hosting the model registry.

3

Insufficient permissions to access the model registry on the MLflow server.

✓ Fix

Ensure your MLflow client has proper authentication and authorization to access the model registry, such as setting up credentials or tokens.

Code: broken vs fixed

Broken - triggers the error
python
import mlflow
client = mlflow.tracking.MlflowClient()
# This line raises MlflowException if model not found
model = client.get_registered_model("my_model")
Fixed - works correctly
python
import os
import mlflow
os.environ["MLFLOW_TRACKING_URI"] = "https://my-mlflow-server.com"
client = mlflow.tracking.MlflowClient()
# Fixed: ensure model exists and tracking URI is set
model = client.get_registered_model("my_model")
print(f"Model info: {model}")
Set the MLFLOW_TRACKING_URI environment variable to the correct server and ensure the model name exists to avoid MlflowException.

Workaround

Wrap get_registered_model call in try/except MlflowException, and if caught, fallback to creating the model or logging a warning to handle missing registry gracefully.

Prevention

Always configure and verify MLflow tracking URI and model registry existence during deployment and CI/CD pipelines to prevent runtime registry access errors.

Python 3.7+ · mlflow >=1.30.0 · tested on 1.35.0
Verified 2026-04
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.