Skip to content

Commit 2b71302

Browse files
committed
docs(mlflow): clarify artifact server path resolution in _artifact_server_path method
- Updated the docstring for the _artifact_server_path method to explain the differences in path resolution between the standard MLflow artifact server and the ODH fork. - Emphasized the importance of ignoring the `?run_id=` query parameter for correct artifact storage location in the ODH server.
1 parent b6a053e commit 2b71302

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/evalhub/adapter/mlflow.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,19 @@ def get_run(self, run_id: str) -> RunInfo:
479479
def _artifact_server_path(artifact_uri: str, artifact_path: str) -> str:
480480
"""Compute the PUT path for the MLflow Artifacts server from a run's artifact_uri.
481481
482-
The ODH fork ignores ``?run_id=`` for path resolution and stores files
483-
relative to the workspace root. The run's ``artifact_uri`` has the form::
482+
The standard MLflow artifact server derives the storage path from a
483+
``?run_id=`` query parameter on artifact upload requests. The ODH fork
484+
ignores that parameter and instead resolves paths from the ``artifact_uri``
485+
embedded in the run record, which has the form::
484486
485487
mlflow-artifacts:/workspaces/{workspace}/{experiment_id}/{run_id}/artifacts
486488
487489
Stripping ``mlflow-artifacts:/workspaces/{workspace}/`` gives the path
488-
within the workspace's artifact storage, which is what the server expects
489-
in the URL after ``/api/2.0/mlflow-artifacts/artifacts/``.
490+
within the workspace's artifact storage, which is what the ODH server
491+
expects after ``/api/2.0/mlflow-artifacts/artifacts/`` — no ``?run_id=``
492+
query string. The upstream library would send ``?run_id=``, which the ODH
493+
server ignores for path resolution, potentially causing files to land in
494+
the wrong location.
490495
"""
491496
# Strip scheme
492497
path = artifact_uri.removeprefix("mlflow-artifacts:/")

0 commit comments

Comments
 (0)