network_manager#

Module Contents#

NetworkManager

Abstract class.

class NetworkManager(network: fedlab.core.network.DistNetwork)#

Bases: torch.multiprocessing.Process

Abstract class.

Parameters:

network (DistNetwork) – object to manage torch.distributed network communication.

run()#

Main Process:

  1. Initialization stage.

  2. FL communication stage.

  3. Shutdown stage. Close network connection.

setup()#

Initialize network connection and necessary setups.

At first, self._network.init_network_connection() is required to be called.

Overwrite this method to implement system setup message communication procedure.

abstract main_loop()#

Define the actions of communication stage.

shutdown()#

Shutdown stage.

Close the network connection in the end.