MlflowHandle#

class scikitplot.mlflow.MlflowHandle(_mlflow_module, _tracking_uri, _registry_uri, _ui_url, _client, _artifacts, _models, server=None, version=None, experiment_name=None, default_run_name=None, default_run_tags=None)[source]#

A handle that proxies the upstream mlflow module while adding session context.

Attributes:
mlflow_modulemodule

Imported mlflow module for this session.

tracking_uristr

Resolved tracking URI used for this session.

registry_uristr or None

Optional registry URI used for this session.

ui_urlstr

Human-facing URL for opening the MLflow UI.

clientmlflow.tracking.MlflowClient

MLflow client bound to the session.

artifactsArtifactsFacade

Artifact helper facade.

modelsModelsFacade

Model helper facade.

serverSpawnedServer or None

Spawned server handle if start_server=True.

versionMlflowVersion or None

Parsed installed MLflow version, if available.

experiment_namestr or None

Active experiment name configured for this session (if any).

default_run_namestr or None

Default run name used by start_run wrapper.

default_run_tagsMapping[str, str] or None

Default tags applied by start_run wrapper.

Parameters:
  • _mlflow_module (Any)

  • _tracking_uri (str)

  • _registry_uri (str | None)

  • _ui_url (str)

  • _client (Any)

  • _artifacts (ArtifactsFacade)

  • _models (ModelsFacade)

  • server (SpawnedServer | None)

  • version (Any | None)

  • experiment_name (str | None)

  • default_run_name (str | None)

  • default_run_tags (Mapping[str, str] | None)

Notes

Attribute access falls back to the underlying mlflow module. This allows users to omit import mlflow while keeping identical API usage.

property artifacts: ArtifactsFacade#

Artifact helper facade.

Returns:
ArtifactsFacade

Facade providing artifact helpers (log/list/download, etc.).

property client: Any#

MLflow client bound to the session.

Returns:
Any

Instance compatible with mlflow.tracking.MlflowClient.

default_run_name: str | None = None#
default_run_tags: Mapping[str, str] | None = None#
experiment_name: str | None = None#
property mlflow_module: Any#

Imported mlflow module for this session.

property models: ModelsFacade#

Model helper facade.

Returns:
ModelsFacade

Facade providing model registry helpers.

property registry_uri: str | None#

Optional registry URI used for this session.

server: SpawnedServer | None = None#
start_run(*args, **kwargs)[source]#

Start an MLflow run and apply session defaults.

Parameters:
*argsAny

Positional args forwarded to mlflow.start_run.

**kwargsAny

Keyword args forwarded to mlflow.start_run.

Returns:
Iterator[Any]

Context manager yielding the active run object.

Raises:
Exception

Propagates underlying MLflow errors.

Parameters:
Return type:

Iterator[Any]

Notes

Strict behavior: - If run_name is not provided and default_run_name is set, we pass it. - After run starts, if default_run_tags is set, apply them to the active run.

This wrapper does not modify MLflow global state beyond the active run tags.

property tracking_uri: str#

Resolved tracking URI used for this session.

property ui_url: str#

Human-facing URL for opening the MLflow UI.

version: Any | None = None#