Skip to content

Commit 9296884

Browse files
committed
[Deploy] Fix config reading from redis.
1 parent 8595e0f commit 9296884

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

python/fedml/computing/scheduler/model_scheduler/device_model_cache.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,11 +900,14 @@ def get_endpoint_settings(self, endpoint_id) -> Dict:
900900
key_pattern = "{}*{}*".format(
901901
self.FEDML_MODEL_ENDPOINT_REPLICA_USER_SETTING_TAG,
902902
endpoint_id)
903+
903904
endpoint_settings_keys = \
904905
self.redis_connection.keys(pattern=key_pattern)
905-
if endpoint_settings_keys:
906+
907+
if len(endpoint_settings_keys) > 0:
906908
endpoint_settings = \
907-
json.load(endpoint_settings_keys[0])
909+
self.redis_connection.get(endpoint_settings_keys[0])
910+
908911
if not isinstance(endpoint_settings, dict):
909912
endpoint_settings = json.loads(endpoint_settings)
910913
else:

0 commit comments

Comments
 (0)