network_manager#
Module Contents#
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:
Initialization stage.
FL communication stage.
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.