Skip to content

Add support for 'mlflow-artifacts' source in import#229

Open
erwin-vanduijnhoven wants to merge 4 commits into
mlflow:masterfrom
erwin-vanduijnhoven:master
Open

Add support for 'mlflow-artifacts' source in import#229
erwin-vanduijnhoven wants to merge 4 commits into
mlflow:masterfrom
erwin-vanduijnhoven:master

Conversation

@erwin-vanduijnhoven
Copy link
Copy Markdown

@erwin-vanduijnhoven erwin-vanduijnhoven commented Jan 13, 2026

This PR improves interoperability with newer MLflow Tracking Server artifact URI formats (mlflow.artifacts) and fixes several edge cases in how model artifact paths are parsed from registered model version source fields. It also adds tests to prevent regressions.

What’s changed

  • Allow mlflow-artifacts: URIs as valid source values when importing model versions (skip local filesystem existence checks for this scheme, similar to dbfs:/s3:).
  • Fix artifact subpath extraction by matching on artifacts/ and correcting slicing to avoid off-by-one errors that could truncate paths.
  • Normalize artifact/model name extraction in copy/run utilities by consistently using artifacts/.
  • Add open-source tests covering mlflow-artifacts: sources with and without an artifact subpath.

Why

  • MLflow can emit mlflow-artifacts: URIs for artifact locations; imports should treat these as remote/virtual locations rather than local paths.
  • Existing parsing logic could mis-handle certain source strings (missing/extra leading slash, truncated first character, ambiguous "artifacts" match).

Testing

  • Added unit tests in tests/open_source/test_models.py for mlflow-artifacts: path handling.

Notes

  • No behavior change for existing dbfs: and s3: sources; local file path validation remains in place for non-remote schemes.

@a-gajam
Copy link
Copy Markdown
Contributor

a-gajam commented Jan 16, 2026

Can you provide more description on the feature?

@erwin-vanduijnhoven
Copy link
Copy Markdown
Author

@a-gajam could you review this PR?

@a-gajam a-gajam self-requested a review April 7, 2026 18:09
Copy link
Copy Markdown
Contributor

@a-gajam a-gajam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants