mlflow/mlflow · warning · UserWarning
Failure attempting to register default experimentcontext pro
Error message
Failure attempting to register default experimentcontext provider "{entrypoint.name}": {exc} What it means
The default-experiment provider registry loads `mlflow.default_experiment_provider` entry points at startup. If a provider package raises AttributeError or ImportError on import, a warning reports the entrypoint name and the exception.
Source
Thrown at mlflow/tracking/default_experiment/registry.py:41
MLflow Experiment IDs based on the current context where the MLflow client is running when
the user has not explicitly set an experiment. Implementations declared though the entrypoints
`mlflow.default_experiment_provider` group can be automatically registered through the
`register_entrypoints` method.
"""
def __init__(self):
self._registry = []
def register(self, default_experiment_provider_cls):
self._registry.append(default_experiment_provider_cls())
def register_entrypoints(self):
"""Register tracking stores provided by other packages"""
for entrypoint in get_entry_points("mlflow.default_experiment_provider"):
try:
self.register(entrypoint.load())
except (AttributeError, ImportError) as exc:
warnings.warn(
"Failure attempting to register default experiment"
+ f'context provider "{entrypoint.name}": {exc}',
stacklevel=2,
)
def __iter__(self):
return iter(self._registry)
_default_experiment_provider_registry = DefaultExperimentProviderRegistry()
for exp_provider in _EXPERIMENT_PROVIDERS:
_default_experiment_provider_registry.register(exp_provider)
_default_experiment_provider_registry.register_entrypoints()
def get_experiment_id() -> str | None:
"""Get an experiment ID for the current context.View on GitHub (pinned to 6a27f2decc)
Solutions
- Inspect the exception text, then reinstall the failing provider package.
- Uninstall the plugin if it is not needed.
- Rebuild the environment/venv to remove stale entry points.
Example fix
// before import my_default_exp_provider # ImportError // after # pip install --force-reinstall my-mlflow-default-experiment-provider
Defensive patterns
Strategy: validation
Validate before calling
from importlib.metadata import entry_points
for ep in entry_points(group="mlflow.default_experiment_provider"):
try:
ep.load()
except Exception as e:
print(f"broken provider {ep.name}: {e}") Try / catch
import warnings
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
import mlflow
for warn in w:
if "default experiment" in str(warn.message):
fix_or_remove_plugin(warn) Prevention
- Keep plugin packages' dependencies declared and pinned.
- Avoid manual deletion of site-packages; use pip uninstall.
- Check this warning right after upgrading mlflow or plugins.
When it happens
Trigger: An installed package declaring the `mlflow.default_experiment_provider` entry point whose referenced module or attribute cannot be loaded.
Common situations: Broken plugin installs, mismatched dependency versions after upgrades, leftover metadata from uninstalled packages in the environment.
Related errors
- Failure attempting to register context provider "{}": {}
- Failure attempting to register store for scheme "{}": {}
- Failure attempting to register request auth provider "{}": {
- Failure attempting to register request header provider "{}":
- Failed to load the plugin "{item}": {exc}
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/156b2da13356158a.
Report an issue: GitHub.