ServerConfig#

class scikitplot.mlflow.ServerConfig(host='127.0.0.1', port=5000, auto_host_in_docker=False, docker_host='0.0.0.0', workers=None, backend_store_uri=None, registry_store_uri=None, default_artifact_root=None, serve_artifacts=False, no_serve_artifacts=False, artifacts_destination=None, artifacts_only=False, allowed_hosts=None, cors_allowed_origins=None, x_frame_options=None, disable_security_middleware=False, static_prefix=None, uvicorn_opts=None, gunicorn_opts=None, waitress_opts=None, expose_prometheus=None, app_name=None, dev=False, secrets_cache_ttl=None, secrets_cache_max_size=None, strict_cli_compat=True, extra_args=None)[source]#

Configuration that maps directly to mlflow server CLI flags.

Parameters:
hoststr, default=”127.0.0.1”

Host interface to bind.

portint, default=5000

Port to bind.

auto_host_in_dockerbool, default=False

If True and running inside Docker (/.dockerenv exists), then a configured host of 127.0.0.1 will be overridden to docker_host when spawning the server. This makes the UI reachable with container port publishing.

docker_hoststr, default=”0.0.0.0”

Host value to use when auto_host_in_docker triggers.

workersint or None, default=None

Optional number of worker processes.

backend_store_uristr or None, default=None

--backend-store-uri.

registry_store_uristr or None, default=None

--registry-store-uri.

default_artifact_rootstr or None, default=None

--default-artifact-root.

serve_artifactsbool, default=False

If True, adds --serve-artifacts.

no_serve_artifactsbool, default=False

If True, adds --no-serve-artifacts.

artifacts_destinationstr or None, default=None

--artifacts-destination.

artifacts_onlybool, default=False

If True, adds --artifacts-only.

allowed_hostsstr or None, default=None

--allowed-hosts.

cors_allowed_originsstr or None, default=None

--cors-allowed-origins.

x_frame_optionsstr or None, default=None

--x-frame-options.

disable_security_middlewarebool, default=False

--disable-security-middleware.

static_prefixstr or None, default=None

--static-prefix.

uvicorn_optsstr or None, default=None

--uvicorn-opts.

gunicorn_optsstr or None, default=None

--gunicorn-opts.

waitress_optsstr or None, default=None

--waitress-opts.

expose_prometheusstr or None, default=None

--expose-prometheus (directory to store metrics, enables /metrics).

app_namestr or None, default=None

--app-name.

devbool, default=False

--dev (debug + auto-reload; unsupported on Windows).

secrets_cache_ttlint or None, default=None

--secrets-cache-ttl (seconds; MLflow enforces ranges at runtime).

secrets_cache_max_sizeint or None, default=None

--secrets-cache-max-size (entries; MLflow enforces ranges at runtime).

strict_cli_compatbool, default=True

If True, validate that every configured CLI flag is supported by the installed MLflow, using mlflow server --help. Unknown flags raise MlflowCliIncompatibleError.

extra_argsSequence[str] or None, default=None

Extra CLI args appended verbatim. With strict_cli_compat=True, flags inside extra_args are also checked for support.

Raises:
ValueError

If configuration violates generic constraints (e.g., invalid port).

Parameters:
  • host (str)

  • port (int)

  • auto_host_in_docker (bool)

  • docker_host (str)

  • workers (int | None)

  • backend_store_uri (str | None)

  • registry_store_uri (str | None)

  • default_artifact_root (str | None)

  • serve_artifacts (bool)

  • no_serve_artifacts (bool)

  • artifacts_destination (str | None)

  • artifacts_only (bool)

  • allowed_hosts (str | None)

  • cors_allowed_origins (str | None)

  • x_frame_options (str | None)

  • disable_security_middleware (bool)

  • static_prefix (str | None)

  • uvicorn_opts (str | None)

  • gunicorn_opts (str | None)

  • waitress_opts (str | None)

  • expose_prometheus (str | None)

  • app_name (str | None)

  • dev (bool)

  • secrets_cache_ttl (int | None)

  • secrets_cache_max_size (int | None)

  • strict_cli_compat (bool)

  • extra_args (Sequence[str] | None)

allowed_hosts: str | None = None#
app_name: str | None = None#
artifacts_destination: str | None = None#
artifacts_only: bool = False#
auto_host_in_docker: bool = False#
backend_store_uri: str | None = None#
cors_allowed_origins: str | None = None#
default_artifact_root: str | None = None#
dev: bool = False#
disable_security_middleware: bool = False#
docker_host: str = '0.0.0.0'#
expose_prometheus: str | None = None#
extra_args: Sequence[str] | None = None#
gunicorn_opts: str | None = None#
host: str = '127.0.0.1'#
no_serve_artifacts: bool = False#
port: int = 5000#
registry_store_uri: str | None = None#
secrets_cache_max_size: int | None = None#
secrets_cache_ttl: int | None = None#
serve_artifacts: bool = False#
static_prefix: str | None = None#
strict_cli_compat: bool = True#
uvicorn_opts: str | None = None#
validate(*, for_managed_tracking)[source]#

Validate configuration against generic MLflow constraints.

Parameters:
for_managed_trackingbool

If True, validation assumes a tracking server will be spawned and readiness will be checked via tracking REST endpoints.

Raises:
ValueError

If validation fails.

Parameters:

for_managed_tracking (bool)

Return type:

None

Notes

  • This method validates generic invariants and known mutual-exclusivity rules.

  • Exact per-version validation is delegated to MLflow itself; unsupported flags are caught separately when strict_cli_compat=True.

waitress_opts: str | None = None#
workers: int | None = None#
x_frame_options: str | None = None#