mlflow/mlflow · warning

Failed to determine whether {source.__name__} can resolve so

Error message

Failed to determine whether {source.__name__} can resolve source information for '{raw_source}'. Exception: {e}

What it means

During DatasetSourceRegistry.resolve(), each registered source's _can_resolve(raw_source) is tried; if one raises, MLflow warns with the source class name and exception, skips that source, and continues with the remaining sources. Resolution may still succeed via another source.

Source

Thrown at mlflow/data/dataset_source_registry.py:67

                also considered. If unspecified, all registered sources are considered.

        Raises:
            MlflowException: If no DatasetSource class can resolve the raw source.

        Returns:
            The resolved DatasetSource.
        """
        matching_sources = []
        for source in self.sources:
            if candidate_sources and not any(
                issubclass(source, candidate_src) for candidate_src in candidate_sources
            ):
                continue
            try:
                if source._can_resolve(raw_source):
                    matching_sources.append(source)
            except Exception as e:
                warnings.warn(
                    f"Failed to determine whether {source.__name__} can resolve source"
                    f" information for '{raw_source}'. Exception: {e}",
                    stacklevel=2,
                )
                continue

        if len(matching_sources) > 1:
            source_class_names_str = ", ".join([source.__name__ for source in matching_sources])
            warnings.warn(
                f"The specified dataset source can be interpreted in multiple ways:"
                f" {source_class_names_str}. MLflow will assume that this is a"
                f" {matching_sources[-1].__name__} source.",
                stacklevel=2,
            )

        for matching_source in reversed(matching_sources):
            try:
                return matching_source._resolve(raw_source)

View on GitHub (pinned to 6a27f2decc)

Solutions

  1. Read the embedded exception and the source class name; fix the underlying cause (e.g. correct the URL/path, provide credentials).
  2. Uninstall or update the misbehaving source plugin if it is not required.
  3. If you wrote the source, make _can_resolve robust: return False for unsupported inputs instead of raising.
  4. Verify the raw_source string is well-formed for the intended source type.

Example fix

# before
source = mlflow.data.resolve_source("http:/malformed-url")

# after
source = mlflow.data.resolve_source("https://example.com/data.csv")
Defensive patterns

Strategy: try-catch

Validate before calling

from urllib.parse import urlparse
raw = "https://example.com/data.csv"
parsed = urlparse(raw)
if not parsed.scheme or parsed.scheme not in {"http", "https", "s3", "file", "gs"}:
    raise ValueError(f"Malformed dataset source: {raw}")

Type guard

def is_well_formed_source(raw) -> bool:
    return isinstance(raw, str) and len(raw) > 0 and "://" in raw or raw.startswith("/")

Try / catch

import warnings
with warnings.catch_warnings(record=True) as caught:
    warnings.simplefilter("always")
    source = mlflow.data.resolve_source(raw_source)
for w in caught:
    if "can resolve source information" in str(w.message):
        print("a source plugin failed while probing:", w.message)

Prevention

When it happens

Trigger: Calling mlflow.data.resolve_dataset_source (or registry.resolve) with a raw source (path/URL) when a registered dataset source's _can_resolve implementation throws on that input.

Common situations: A plugin dataset source that assumes a URL format or filesystem access that fails (unreachable URL, bad credentials, malformed path), or a buggy third-party source plugin.

Related errors


AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29). Data as JSON: /api/errors/39d31c54f39cbdf5. Report an issue: GitHub.