Skip to content

Commit

Permalink
Fix - replace client_name with client_id in get_model_from_combiner
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminastrand committed Nov 7, 2024
1 parent f9cbe6b commit 1d3cb0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fedn/network/clients/fedn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def update_local_model(self, request):
model_update_id = str(uuid.uuid4())

tic = time.time()
in_model = self.get_model_from_combiner(id=model_id, client_name=self.name)
in_model = self.get_model_from_combiner(id=model_id, client_id=self.client_id)

if in_model is None:
logger.error("Could not retrieve model from combiner. Aborting training request.")
Expand Down Expand Up @@ -254,7 +254,7 @@ def validate_global_model(self, request):

self.send_status(f"Processing validate request for model_id {model_id}", sesssion_id=request.session_id, sender_name=self.name)

in_model = self.get_model_from_combiner(id=model_id, client_name=self.name)
in_model = self.get_model_from_combiner(id=model_id, client_id=self.client_id)

if in_model is None:
logger.error("Could not retrieve model from combiner. Aborting validation request.")
Expand Down Expand Up @@ -293,7 +293,7 @@ def validate_global_model(self, request):

def predict_global_model(self, request):
model_id = request.model_id
model = self.get_model_from_combiner(id=model_id, client_name=self.name)
model = self.get_model_from_combiner(id=model_id, client_id=self.client_id)

if model is None:
logger.error("Could not retrieve model from combiner. Aborting prediction request.")
Expand Down Expand Up @@ -358,7 +358,7 @@ def run(self):
logger.info("Client stopped by user.")

def get_model_from_combiner(self, id: str, client_id: str, timeout: int = 20) -> BytesIO:
return self.grpc_handler.get_model_from_combiner(id=id, client_name=client_id, timeout=timeout)
return self.grpc_handler.get_model_from_combiner(id=id, client_id=client_id, timeout=timeout)

def send_model_to_combiner(self, model: BytesIO, id: str):
return self.grpc_handler.send_model_to_combiner(model, id)
Expand Down

0 comments on commit 1d3cb0a

Please sign in to comment.