wait_tracking_ready#

scikitplot.mlflow.wait_tracking_ready(tracking_uri, timeout_s, *, server=None, poll_interval_s=0.2, request_timeout_s=2.0)[source]#

Wait until the MLflow tracking REST API responds.

Parameters:
tracking_uristr

MLflow tracking URI, e.g., "http://127.0.0.1:5000".

timeout_sfloat

Maximum seconds to wait.

serverSpawnedServer or None, default=None

If provided, and the server process exits while waiting, raise immediately with captured output.

poll_interval_sfloat, default=0.2

Seconds to sleep between readiness check attempts. Callers may lower this for tests or raise it for slow environments.

request_timeout_sfloat, default=2.0

Per-request HTTP timeout in seconds.

Returns:
None
Raises:
ValueError

If tracking_uri is not an HTTP(S) URI.

RuntimeError

If the server exits before becoming ready.

TimeoutError

If readiness is not reached within timeout_s.

Parameters:
Return type:

None

Notes

MLflow has evolved REST endpoints over time and can be deployed behind different server stacks. This function uses a deterministic two-step check:

  1. POST /api/2.0/mlflow/experiments/search (stable modern endpoint)

  2. If the server responds with 404/405, fallback to GET /api/2.0/mlflow/experiments/list

Any 200 response from either endpoint is considered “ready”. Debug-level log lines are emitted on each attempt to support diagnostics in slow or broken-pipe environments.