Skip to content

Commit

Permalink
[release/0.5] Update creds import in python client (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiovincenzi authored Apr 5, 2024
1 parent fd9b942 commit daef6f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/fasttrackml/_tracking_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@

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

try:
from mlflow.utils.credentials import get_default_host_creds
except ImportError:
from mlflow.tracking._tracking_service.utils import _get_default_host_creds as get_default_host_creds

from mlflow.utils.time import get_current_time_millis
from mlflow.utils.validation import MAX_METRICS_PER_BATCH

Expand All @@ -20,7 +25,7 @@ class FasttrackmlTrackingServiceClient(TrackingServiceClient):

def __init__(self, tracking_uri):
super().__init__(tracking_uri)
self.custom_store = CustomRestStore(partial(utils._get_default_host_creds, self.tracking_uri))
self.custom_store = CustomRestStore(partial(get_default_host_creds, self.tracking_uri))

def log_metric(
self,
Expand Down
3 changes: 3 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Topic :: Utilities",
]
dependencies = [
"mlflow >= 2.8.0, < 3.0",
]

[project.urls]
Homepage = "https://fasttrackml.io/"
Expand Down

0 comments on commit daef6f9

Please sign in to comment.