enpi_api.l2.client.enpi_mlflow
1import sys 2 3import mlflow 4from enpi_api.l2.util.env import get_mlflow_host 5 6 7def configure_enpi_mlflow(force: bool = False) -> None: 8 if mlflow.is_tracking_uri_set() and not force: 9 # Print to stderr to avoid breaking the API 10 print("MLflow is already configured, skipping", file=sys.stderr) 11 return 12 13 # We only need to set the tracking URI, the artifact and registry URIs are set automatically 14 mlflow.set_tracking_uri(uri=get_mlflow_host())
def
configure_enpi_mlflow(force: bool = False) -> None:
8def configure_enpi_mlflow(force: bool = False) -> None: 9 if mlflow.is_tracking_uri_set() and not force: 10 # Print to stderr to avoid breaking the API 11 print("MLflow is already configured, skipping", file=sys.stderr) 12 return 13 14 # We only need to set the tracking URI, the artifact and registry URIs are set automatically 15 mlflow.set_tracking_uri(uri=get_mlflow_host())