Skip to content

Model version tags are lost in full-instance OSS migration (export-all/import-all) #240

Description

@mueslo

When migrating an entire MLflow instance using bulk tools (export-all then import-all), registered model tags are preserved, but per-version tags on model versions are not preserved.

Observed behavior

  • Registered model tags are present after import.
  • Model-version tags for many/all versions are missing after import.

Expected behavior

  • Both registered model tags and model-version tags should be preserved.

Confirmed code path

  • Full-instance export goes through export_all.py, which delegates to export_models.py.
  • Each model export calls export_model.py, which fetches versions via list_model_versions.
  • In non-UC path, list_model_versions returns search results directly at model_utils.py (or latest versions at model_utils.py), without per-version population via get_model_version.
  • In UC path, versions are explicitly populated via get_model_version at model_utils.py.
  • Import side does pass src_vr tags into create_model_version (import_model_version.py, import_model_version.py), so missing tags are likely already absent in exported metadata for this path.

Why this affects OSS full-instance migration

  • Whole-instance migration uses bulk export/import flow (not single export-model-version by default).
  • The non-UC export path for model versions differs from UC and can propagate incomplete version metadata.
  • Therefore, model-version tag preservation is not guaranteed in OSS bulk migration and can fail in practice.

Reproduction (high level)

  1. Create a registered model with version tags on source OSS MLflow.
  2. Run export-all.
  3. Run import-all into destination OSS MLflow.
  4. Inspect destination model versions: tags are missing, while model-level tags remain.

Potential fix direction

  • In non-UC list_model_versions, populate each version with get_model_version (same strategy already used for UC in model_utils.py) before serialization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions