resolve_download_artifacts#

scikitplot.mlflow.resolve_download_artifacts(mlflow_module, *, client=None)[source]#

Resolve a canonical artifact download function across MLflow versions.

Parameters:
mlflow_modulemodule

Imported mlflow module.

clientAny or None, default=None

Optional MLflow client bound to the desired tracking URI. If provided, it will be used for fallback APIs to avoid accidentally downloading from a different server.

Returns:
callable

A callable compatible with mlflow.artifacts.download_artifacts(...).

Raises:
AttributeError

If no supported artifact download API is found.

Parameters:
  • mlflow_module (Any)

  • client (Any | None)

Return type:

Callable[[…], str]

Notes

Preference order is deterministic: 1) mlflow.artifacts.download_artifacts (public modern API) 2) client.download_artifacts (session-bound) 3) MlflowClient.download_artifacts (legacy, constructed without explicit URI)