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
mlflowmodule while adding session context.- Attributes:
mlflow_modulemoduleImported
mlflowmodule for this session.tracking_uristrResolved tracking URI used for this session.
registry_uristr or NoneOptional registry URI used for this session.
ui_urlstrHuman-facing URL for opening the MLflow UI.
clientmlflow.tracking.MlflowClientMLflow client bound to the session.
artifactsArtifactsFacadeArtifact helper facade.
modelsModelsFacadeModel 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_runwrapper.- default_run_tagsMapping[str, str] or None
Default tags applied by
start_runwrapper.
- Parameters:
Notes
Attribute access falls back to the underlying
mlflowmodule. This allows users to omitimport mlflowwhile 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.
- property models: ModelsFacade#
Model helper facade.
- Returns:
- ModelsFacade
Facade providing model registry helpers.
- 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:
Notes
Strict behavior: - If
run_nameis not provided anddefault_run_nameis set, we pass it. - After run starts, ifdefault_run_tagsis set, apply them to the active run.This wrapper does not modify MLflow global state beyond the active run tags.