Skip to content

Commit

Permalink
Merge pull request #242 from donggook-me/master
Browse files Browse the repository at this point in the history
�fix typo
  • Loading branch information
fanlai0990 authored Oct 25, 2023
2 parents a9ff1f0 + 15612d3 commit e62ad70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/auxo/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions fedscale/cloud/aggregation/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ========
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e62ad70

Please sign in to comment.