SessionConfig#
- class scikitplot.mlflow.SessionConfig(tracking_uri=None, public_tracking_uri=None, registry_uri=None, env_file=None, extra_env=None, startup_timeout_s=30.0, ensure_reachable=False, experiment_name=None, create_experiment_if_missing=True, default_run_name=None, default_run_tags=None)[source]#
Session-level configuration for
scikitplot.mlflow.session.- Parameters:
- tracking_uristr or None, default=None
MLflow tracking URI to use inside the session.
- public_tracking_uristr or None, default=None
Optional UI URL to display to users (e.g., when running in Docker/remote notebooks). This does NOT change the internal tracking URI used by MLflow calls; it is only for human-facing navigation. If None, the session reads
MLFLOW_TRACKING_URIfrom the environment (after loadingenv_file, if provided). Ifstart_server=Trueand no URI is provided, it will be constructed ashttp://{tracking_host}:{server.port}.- registry_uristr or None, default=None
Optional MLflow registry URI. If None, the session reads
MLFLOW_REGISTRY_URIfrom the environment (after loadingenv_file, if provided).- env_filestr or None, default=None
Optional path to a
.envfile. Keys are loaded only if missing fromos.environ, matching MLflow CLI--env-filebehavior.- extra_envMapping[str, str] or None, default=None
Additional environment variables to set for the duration of the session. These override current env vars and are restored on exit.
- startup_timeout_sfloat, default=30.0
Maximum seconds to wait for MLflow server readiness when
start_server=True.- ensure_reachablebool, default=False
If True, verify the configured tracking URI is reachable even when
start_server=False. This performs the same readiness check used for managed servers.- experiment_namestr or None, default=None
If provided, set the active experiment on session entry (before any runs).
- create_experiment_if_missingbool, default=True
Controls behavior when
experiment_namedoes not exist: - True: create the experiment (viamlflow.set_experiment) - False: raise a KeyError (strict fail)- default_run_namestr or None, default=None
Default
run_nameapplied byMlflowHandle.start_runif the caller did not provide an explicit run name.- default_run_tagsMapping[str, str] or None, default=None
Default tags applied by
MlflowHandle.start_runwhen a run begins.
- Raises:
- ValueError
If
startup_timeout_sis not positive.
- Parameters:
Notes
Precedence order is strict: 1) explicit arguments (
tracking_uri,registry_uri,extra_env) 2) existing environment variables 3).envfile (fills missing keys only) 4) defaults