manager#

Module Contents#

ScaleClientPassiveManager

Special client manager for SerialTrainer.

class ScaleClientPassiveManager(network, trainer, logger=Logger())#

Bases: fedlab.core.client.manager.ClientPassiveManager

Special client manager for SerialTrainer.

We modify the communication agreements to create a mapping from client id to process rank. Thus, ScaleClientPassiveManager is able to simulate multiple clients in sequence.

Parameters
  • network (DistNetwork) – Distributed network to use.

  • trainer (ClientTrainer) – Subclass of ClientTrainer, providing train() and model. For more client simulation with single process, you are supposed to use SerialTrainer here.

  • logger (Logger) – object of Logger.

main_loop(self)#

Actions to perform when receiving new message, including local training.

synchronize(self)#

Synchronize local model with server actively