fedlab_core.server.topology¶
Module Contents¶
Classes¶
Abstract class for server network topology |
|
Synchronous communication class |
-
class
fedlab_core.server.topology.EndTop(server_handler, server_address, dist_backend)¶ Bases:
torch.multiprocessing.ProcessAbstract class for server network topology
If you want to define your own topology agreements, please subclass it.
- Parameters
-
abstract
run(self)¶ Process
-
abstract
activate_clients(self)¶ Activate some of clients to join this FL round
-
abstract
listen_clients(self)¶ Listen messages from clients
-
class
fedlab_core.server.topology.ServerSyncTop(server_handler, server_address, dist_backend='gloo', logger_path='server_top.txt', logger_name='ServerTop')¶ Bases:
fedlab_core.server.topology.EndTopSynchronous communication class
This is the top class in our framework which is mainly responsible for network communication of SERVER!. Synchronize with clients following agreements defined in
run().- Parameters
server_handler – Subclass of
ParameterServerHandlerserver_address (tuple) – Address of this server in form of
(SERVER_ADDR, SERVER_IP)dist_backend (str or Backend) –
backendoftorch.distributed. Valid values includempi,gloo,nccl. Default (and) –
"gloo"logger_path (str, optional) – path to the log file for this class. Default:
"server_top.txt"logger_name (str, optional) – class name to initialize logger. Default:
"ServerTop"
- Raises
None –
-
run(self)¶ Process
-
activate_clients(self)¶ Activate some of clients to join this FL round
-
listen_clients(self)¶ Listen messages from clients