From fd9b94234ed73d7e700dd79cf4c030eb999f4d39 Mon Sep 17 00:00:00 2001 From: fabiovincenzi <93596376+fabiovincenzi@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:56:35 +0100 Subject: [PATCH] [release/0.5] Fix credentials in Python Client (#1004) Fix credentials in Python Client --- python/fasttrackml/_tracking_service/client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/fasttrackml/_tracking_service/client.py b/python/fasttrackml/_tracking_service/client.py index 1296b1568..d94a70dc8 100644 --- a/python/fasttrackml/_tracking_service/client.py +++ b/python/fasttrackml/_tracking_service/client.py @@ -1,13 +1,14 @@ +from functools import partial from typing import Dict, Optional, Sequence from mlflow.entities import Param, RunTag from mlflow.store.tracking import GET_METRIC_HISTORY_MAX_RESULTS +from mlflow.tracking._tracking_service import utils from mlflow.tracking._tracking_service.client import TrackingServiceClient from mlflow.tracking.metric_value_conversion_utils import ( convert_metric_value_to_float_if_possible, ) from mlflow.utils import chunk_list -from mlflow.utils.rest_utils import MlflowHostCreds from mlflow.utils.time import get_current_time_millis from mlflow.utils.validation import MAX_METRICS_PER_BATCH @@ -19,7 +20,7 @@ class FasttrackmlTrackingServiceClient(TrackingServiceClient): def __init__(self, tracking_uri): super().__init__(tracking_uri) - self.custom_store = CustomRestStore(lambda: MlflowHostCreds(self.tracking_uri)) + self.custom_store = CustomRestStore(partial(utils._get_default_host_creds, self.tracking_uri)) def log_metric( self,