network_manager#

Module Contents#

NetworkManager

Abstract class

class NetworkManager(network)#

Bases: torch.multiprocessing.Process

Abstract class

Parameters

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

run(self)#

Main Process:

  1. Initialization stage.

  2. FL communication stage.

  3. Shutdown stage. Close network connection.

setup(self, *args, **kwargs)#

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(self, *args, **kwargs)#

Define the actions of communication stage.

shutdown(self, *args, **kwargs)#

Shutdown stage.

Close the network connection in the end.