From 3a8279e6c0d1a4144451d3d50b74674cea3ff181 Mon Sep 17 00:00:00 2001 From: Juliandocode <53322908+donggook-me@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:04:10 +0900 Subject: [PATCH 1/2] Update aggregator.py I think "sever" is written by mistake, so i changed it by "server" in context. --- fedscale/cloud/aggregation/aggregator.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fedscale/cloud/aggregation/aggregator.py b/fedscale/cloud/aggregation/aggregator.py index a49bde8d..05746f80 100755 --- a/fedscale/cloud/aggregation/aggregator.py +++ b/fedscale/cloud/aggregation/aggregator.py @@ -71,7 +71,7 @@ def __init__(self, args): # ======== Event Queue ======= self.individual_client_events = {} # Unicast - self.sever_events_queue = collections.deque() + self.server_events_queue = collections.deque() self.broadcast_events_queue = collections.deque() # Broadcast # ======== runtime information ======== @@ -177,7 +177,7 @@ def init_control_communication(self): self, self.grpc_server) port = '[::]:{}'.format(self.args.ps_port) - logging.info(f'%%%%%%%%%% Opening aggregator sever using port {port} %%%%%%%%%%') + logging.info(f'%%%%%%%%%% Opening aggregator server using port {port} %%%%%%%%%%') self.grpc_server.add_insecure_port(port) self.grpc_server.start() @@ -750,7 +750,7 @@ def add_event_handler(self, client_id, event, meta, data): data (dictionary): Data transferred in grpc communication, could be model parameters, test result. """ - self.sever_events_queue.append((client_id, event, meta, data)) + self.server_events_queue.append((client_id, event, meta, data)) def CLIENT_REGISTER(self, request, context): """FL TorchClient register to the aggregator @@ -885,8 +885,8 @@ def event_monitor(self): break # Handle events queued on the aggregator - elif len(self.sever_events_queue) > 0: - client_id, current_event, meta, data = self.sever_events_queue.popleft() + elif len(self.server_events_queue) > 0: + client_id, current_event, meta, data = self.server_events_queue.popleft() if current_event == commons.UPLOAD_MODEL: self.client_completion_handler( From 15612d34a6461f8d73767a37efafcd414e341c53 Mon Sep 17 00:00:00 2001 From: Juliandocode <53322908+donggook-me@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:06:18 +0900 Subject: [PATCH 2/2] Update aggregator.py on example code Same reason I changed previous commit, I guess "sever" is written wrongly instead of "server" --- examples/auxo/aggregator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/auxo/aggregator.py b/examples/auxo/aggregator.py index 829bf837..27c832ae 100644 --- a/examples/auxo/aggregator.py +++ b/examples/auxo/aggregator.py @@ -102,9 +102,9 @@ def event_monitor(self): break # Handle events queued on the aggregator - elif len(self.sever_events_queue) > 0: + elif len(self.server_events_queue) > 0: - client_id, current_event, meta, data = self.sever_events_queue.popleft() + client_id, current_event, meta, data = self.server_events_queue.popleft() logging.info(f"Event {current_event} is received from client {client_id}") event_type, cohort_id = decode_msg(current_event)