session#
- scikitplot.mlflow.session(*, config=None, server=None, start_server=False)[source]#
Create a strict, context-managed MLflow session.
- Parameters:
- configSessionConfig or None, default=None
Session-level configuration (URIs,
.env, extra env, timeouts, defaults).- serverServerConfig or None, default=None
Server configuration for managed server mode.
- start_serverbool, default=False
If True, spawns an ephemeral
mlflow serversubprocess and tears it down on exit.
- Returns:
- Iterator[MlflowHandle]
A handle that proxies
mlflowand exposes session-bound helpers.
- Raises:
- ImportError
If MLflow is not installed.
- FileNotFoundError
If
config.env_fileis provided but missing.- ValueError
If configuration is invalid.
- RuntimeError
If the server fails to start or readiness is not reached within the timeout.
- TimeoutError
If readiness is not reached within the timeout.
- KeyError
If
experiment_nameis provided andcreate_experiment_if_missing=Falsebut the experiment does not exist (strict fail).
- Parameters:
config (SessionConfig | None)
server (ServerConfig | None)
start_server (bool)
- Return type:
Notes
Environment is restored exactly on exit.