mlflow/mlflow · error · MlflowNotImplementedException

Databricks trace artifact repositories do not yet support AR

Error message

Databricks trace artifact repositories do not yet support ARCHIVE_REPO trace payloads.

What it means

Databricks trace artifact repositories do not implement download_archived_trace_data; calling it unconditionally raises MlflowNotImplementedException with this message. ARCHIVE_REPO trace payloads (archived traces) are not supported for this repository type yet. It is an intentional capability gap, not a data problem.

Source

Thrown at mlflow/store/artifact/databricks_artifact_repo.py:349

        headers = self._extract_headers_from_credentials(cred.headers)
        try:
            return self._download_trace_file_to_path(signed_uri, dst_path, headers)
        except requests.HTTPError as e:
            if e.response.status_code == 404:
                raise MlflowTraceDataNotFound(request_id=self.resource.id) from e
            raise

    def download_trace_data(self) -> dict[str, Any]:
        with tempfile.TemporaryDirectory() as temp_dir:
            dst = Path(temp_dir, "traces.json")
            self.download_trace_data_to_file(dst)
            try:
                return json.loads(dst.read_text(encoding="utf-8"))
            except json.JSONDecodeError as e:
                raise MlflowTraceDataCorrupted(request_id=self.resource.id) from e

    def download_archived_trace_data(self) -> TraceData:
        raise MlflowNotImplementedException(
            "Databricks trace artifact repositories do not yet support ARCHIVE_REPO trace payloads."
        )

    def upload_trace_data(self, trace_data: str) -> None:
        cred = self._get_upload_trace_data_cred_info()
        with write_local_temp_trace_data_file(trace_data) as temp_file:
            # Upload trace data synchronously to avoid ThreadPoolExecutor deadlock during Python
            # interpreter shutdown, which causes "cannot schedule new futures after shutdown" error.
            if cred.type == ArtifactCredentialType.AZURE_ADLS_GEN2_SAS_URI:
                self._azure_adls_gen2_upload_file(
                    credentials=cred,
                    local_file=temp_file,
                    artifact_file_path=None,
                    get_credentials=lambda artifact_paths: [
                        self._get_upload_trace_data_cred_info()
                    ],
                    is_sync=True,
                )

View on GitHub (pinned to 6a27f2decc)

Solutions

  1. Use download_trace_data() for non-archived traces instead
  2. Check the trace's repo type/lifecycle_stage before calling archive methods
  3. Implement archive access via Databricks APIs directly if needed
  4. Upgrade MLflow — support may be added in later versions

Example fix

// before
data = repo.download_archived_trace_data()
// after
from mlflow.exceptions import MlflowException
try:
    data = repo.download_archived_trace_data()
except MlflowException:
    data = repo.download_trace_data()
Defensive patterns

Strategy: try-catch

Validate before calling

# Feature-detect archive support before calling
def supports_archive_download(repo) -> bool:
    cls = type(repo)
    return cls.download_archived_trace_data is not
        __import__('mlflow.store.artifact.databricks_artifact_repo', fromlist=['x']).DatabricksArtifactRepository.download_archived_trace_data

Try / catch

from mlflow.exceptions import MlflowException
try:
    data = repo.download_archived_trace_data()
except MlflowException as e:
    if 'ARCHIVE_REPO' in str(e):
        data = None  # archive download unsupported for this repo
    else:
        raise

Prevention

When it happens

Trigger: Calling download_archived_trace_data() on a DatabricksArtifactRepository instance, typically via generic trace-retrieval code paths that assume archive support.

Common situations: Generic tooling dispatching on repo type without checking whether archive download is supported; accessing traces moved to an archive repository.

Related errors


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