Skip to content

Commit

Permalink
Update creds import in python client (#1081)
Browse files Browse the repository at this point in the history
Insert lower and upper bound for mlflow dependency
  • Loading branch information
fabiovincenzi authored Apr 5, 2024
1 parent 7d05b57 commit 804eabd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/fasttrackml/_tracking_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

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,
Expand All @@ -13,7 +12,12 @@
RunOperations,
get_combined_run_operations,
)
from mlflow.utils.rest_utils import MlflowHostCreds

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 @@ -25,7 +29,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 804eabd

Please sign in to comment.