ClientManager#
- class ClientManager[source]#
Bases :
ABC
Abstract base class for managing Flower clients.
Methods
all
()Return all available clients.
Return the number of available clients.
register
(client)Register Flower ClientProxy instance.
sample
(num_clients[, min_num_clients, criterion])Sample a number of Flower ClientProxy instances.
unregister
(client)Unregister Flower ClientProxy instance.
wait_for
(num_clients, timeout)Wait until at least num_clients are available.
- abstract num_available() int [source]#
Return the number of available clients.
- Renvoie:
num_available – The number of currently available clients.
- Type renvoyé:
int
- abstract register(client: ClientProxy) bool [source]#
Register Flower ClientProxy instance.
- Paramètres:
client (flwr.server.client_proxy.ClientProxy) –
- Renvoie:
success – Indicating if registration was successful. False if ClientProxy is already registered or can not be registered for any reason.
- Type renvoyé:
bool
- abstract sample(num_clients: int, min_num_clients: int | None = None, criterion: Criterion | None = None) List[ClientProxy] [source]#
Sample a number of Flower ClientProxy instances.