Skip to content

Commit

Permalink
Hotfixing autoscaler's generic passwd.
Browse files Browse the repository at this point in the history
  • Loading branch information
fedml-dimitris committed Apr 29, 2024
1 parent fae18c3 commit 5bdd835
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ class ScaleOp(Enum):

class Autoscaler(metaclass=Singleton):

def __init__(self, redis_addr="local", redis_port=6379, redis_password="fedml_default"):
def __init__(self, redis_addr=None, redis_port=None, redis_password=None):
super().__init__()
self.fedml_model_cache = FedMLModelCache.get_instance()
self.fedml_model_cache.set_redis_params(redis_addr, redis_port, redis_password)
# If at least one redis configuration is None, then use the default values.
# Else, set Redis parameters with given configuration.
if any([not redis_addr, not redis_port, not redis_password]):
self.fedml_model_cache.set_redis_params()
else:

self.fedml_model_cache.set_redis_params(redis_addr, redis_port, redis_password)

@staticmethod
def get_instance(*args, **kwargs):
Expand Down

0 comments on commit 5bdd835

Please sign in to comment.