MlflowProvider#

class scikitplot.mlflow.MlflowProvider(module, version=None, client_factory=None, artifact_downloader=None)[source]#

A customizable provider for MLflow-like libraries.

This class acts as an abstraction layer to support inconsistent MLflow versions, internal wrappers, or alternative tracking libraries that mimic the MLflow API. By defining a custom provider, you can override how modules are imported, clients are instantiated, and artifacts are downloaded.

Parameters:
moduleAny

The custom MLflow-like module object (can be a mock or wrapper).

versionstr or None, default=None

A static version string to bypass dynamic package resolution.

client_factoryCallable[[str, str | None], Any] or None, default=None

A callable taking (tracking_uri, registry_uri) and returning an MLflow client.

artifact_downloaderCallable[…, str] or None, default=None

A callable mimicking mlflow.artifacts.download_artifacts.

Parameters:
artifact_downloader: Callable[[...], str] | None = None#
client_factory: Callable[[str, str | None], Any] | None = None#
get_artifact_downloader(client)[source]#

Resolve the artifact download callable.

Parameters:

client (Any)

Return type:

Callable[[…], str]

get_client(tracking_uri, registry_uri=None)[source]#

Instantiate the MLflow-like client.

Parameters:
  • tracking_uri (str)

  • registry_uri (str | None)

Return type:

Any

module: Any[source]#
version: str | None = None#