mlflow/mlflow · error · NotImplementedError
Tags are not available for Databricks managed datasets. Tags
Error message
Tags are not available for Databricks managed datasets. Tags are managed through Unity Catalog. Use Unity Catalog APIs to manage dataset tags.
What it means
The tags property is only implemented for MLflow-managed evaluation datasets. For Databricks-managed datasets, tags live in Unity Catalog, so MLflow raises NotImplementedError directing you to UC APIs. This prevents silently returning wrong or empty tag data.
Source
Thrown at mlflow/genai/datasets/evaluation_dataset.py:191
@property
def created_time(self) -> int | str | None:
"""The time the dataset was created."""
if self._mlflow_dataset:
return self._mlflow_dataset.created_time
return self._databricks_dataset.create_time
@property
def create_time(self) -> int | str | None:
"""Alias for created_time (for backward compatibility with managed datasets)."""
return self.created_time
@property
def tags(self) -> dict[str, Any] | None:
"""The tags for the dataset (MLflow only)."""
if self._mlflow_dataset:
return self._mlflow_dataset.tags
raise NotImplementedError(
"Tags are not available for Databricks managed datasets. "
"Tags are managed through Unity Catalog. Use Unity Catalog APIs to manage dataset tags."
)
@property
def experiment_ids(self) -> list[str]:
"""The experiment IDs associated with the dataset (MLflow only)."""
if self._mlflow_dataset:
return self._mlflow_dataset.experiment_ids
return self._databricks_dataset.experiment_ids
@property
def schema(self) -> str | None:
"""The schema of the dataset."""
if self._mlflow_dataset:
return self._mlflow_dataset.schema
return self._databricks_dataset.schema if self._databricks_dataset else None
View on GitHub (pinned to 6a27f2decc)
Solutions
- Manage and read tags via Unity Catalog APIs (e.g. ALTER TABLE ... SET TAGS in SQL, or the Databricks SDK's UC table tagging APIs)
- Branch on the backend: only access .tags when the dataset is MLflow-managed
- Store custom metadata outside the dataset (e.g. in an MLflow experiment tag keyed by dataset name) if UC tagging isn't available to you
Example fix
// before
tags = eval_ds.tags # NotImplementedError for Databricks datasets
// after
if eval_ds._mlflow_dataset:
tags = eval_ds.tags
else:
from databricks.sdk import WorkspaceClient
tags = WorkspaceClient().tables.get(eval_ds.name).securable_kind # use UC tag APIs / SQL: SHOW TBLPROPERTIES Defensive patterns
Strategy: validation
Validate before calling
if eval_ds._databricks_dataset is not None:
# tags unavailable; use Unity Catalog tag APIs
from databricks.sdk import WorkspaceClient
tags = None # or fetch via UC: SHOW TBLPROPERTIES / SDK Try / catch
try:
tags = eval_ds.tags
except NotImplementedError:
tags = fetch_uc_tags(eval_ds.name) # Unity Catalog tag lookup Prevention
- Never read .tags on Databricks-backed datasets; manage tags in Unity Catalog
- Write backend-aware helpers that branch on _mlflow_dataset/_databricks_dataset
- Document to your team that dataset tags live in UC, not MLflow
When it happens
Trigger: Reading .tags on an EvaluationDataset backed by a Databricks (UC-managed) dataset, e.g. ds = mlflow.genai.datasets.get_dataset(name="catalog.schema.x"); ds.tags.
Common situations: Code that generically reads dataset tags for logging/audit across both MLflow and Databricks backends, or teams migrating from MLflow-native datasets to UC-managed ones.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Tags are not supported in Databricks environments. Tags are
- Dataset tag operations are not available in Databricks yet.
- `version` is only supported for Databricks datasets.
- Dataset association operations are not available in Databric
- Loading a Databricks Evaluation Dataset from source is not s
AI-assisted analysis of mlflow/mlflow@6a27f2decc (2026-08-29).
Data as JSON: /api/errors/9f6124841a50e945.
Report an issue: GitHub.