normalize_tracking_uri#
- openstef_models.integrations.mlflow.mlflow_storage.normalize_tracking_uri(uri: str) str[source]#
Normalize a tracking URI to a file:/// URI when it refers to a local path.
MLflow’s model registry rejects bare Windows paths (e.g.
D:\mlflow) because the drive letter is not a recognized URI scheme. This function detects local file paths — including relative ones like./mlflow— and converts them to properfile:///URIs viaPath.resolve().as_uri().URIs with recognized multi-character schemes (http, https, sqlite, …) pass through unchanged.