diff --git a/laborious/utils/connectors_config.py b/laborious/utils/connectors_config.py index 467c8e2..029f427 100644 --- a/laborious/utils/connectors_config.py +++ b/laborious/utils/connectors_config.py @@ -3,26 +3,6 @@ from os import getenv from typing import Any -def _build_mlflow_tracking_url() -> str: - """ - Compose a single tracking URI for ``SientiaMLflowRepository`` from host and port env vars. - - If ``MLFLOW_HOST`` already contains a port in the authority (e.g. ``http://tracker:80``), - it is returned unchanged so operators can override port logic explicitly. - - Return: - str: Full tracking URL (scheme + host [+ port]). - """ - - mlflow_host = getenv('MLFLOW_HOST', 'http://localhost').rstrip('/') - mlflow_port = getenv('MLFLOW_PORT', '5080') - - # Host already includes an explicit port (e.g. http://tracker:80) - host_after_scheme = mlflow_host.split('://', 1)[-1] - if ':' in host_after_scheme: - return mlflow_host - - return f'{mlflow_host}:{mlflow_port}' def build_mlflow_config() -> dict[str, Any]: @@ -42,7 +22,7 @@ def build_mlflow_config() -> dict[str, Any]: dict[str, Any]: ``url``, ``username``, ``password``. """ return { - 'url': _build_mlflow_tracking_url(), + 'url': getenv('MLFLOW_URL', 'http://localhost:5080'), 'username': getenv('MLFLOW_USERNAME', 'aignosi'), 'password': getenv('MLFLOW_PASSWORD', 'aignosi'), }