Skip to content

Commit

Permalink
fixed client state error (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
joneswong authored Aug 8, 2022
1 parent 5b2bb38 commit 44ac3fd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions federatedscope/autotune/fedex/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def broadcast_model_para(self,
else:
# broadcast to all clients
receiver = list(self.comm_manager.neighbors.keys())
if msg_type == 'model_para':
self.sampler.change_state(receiver, 'working')

if self._noise_injector is not None and msg_type == 'model_para':
# Inject noise only when broadcast parameters
Expand Down Expand Up @@ -198,6 +200,7 @@ def broadcast_model_para(self,

def callback_funcs_model_para(self, message: Message):
round, sender, content = message.state, message.sender, message.content
self.sampler.change_state(sender, 'idle')
# For a new round
if round not in self.msg_buffer['train'].keys():
self.msg_buffer['train'][round] = dict()
Expand Down

0 comments on commit 44ac3fd

Please # to comment.