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 server subprocess and tears it down on exit.

Returns:
Iterator[MlflowHandle]

A handle that proxies mlflow and exposes session-bound helpers.

Raises:
ImportError

If MLflow is not installed.

FileNotFoundError

If config.env_file is 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_name is provided and create_experiment_if_missing=False but the experiment does not exist (strict fail).

Parameters:
Return type:

Iterator[MlflowHandle]

Notes

Environment is restored exactly on exit.