SimpleClientManager¶
- class SimpleClientManager[소스]¶
기반 클래스:
ClientManager
사용 가능한 클라이언트 그룹 제공.
메소드
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)Flower ClientProxy 인스턴스 등록 해제.
wait_for
(num_clients[, timeout])적어도 1개의 num_clients 가 사용 가능해질 때까지 기다리세요.
- num_available() int [소스]¶
Return the number of available clients.
- 반환:
num_available – The number of currently available clients.
- 반환 형식:
int
- register(client: ClientProxy) bool [소스]¶
Register Flower ClientProxy instance.
- 매개변수:
client (flwr.server.client_proxy.ClientProxy)
- 반환:
success – Indicating if registration was successful. False if ClientProxy is already registered or can not be registered for any reason.
- 반환 형식:
bool
- sample(num_clients: int, min_num_clients: int | None = None, criterion: Criterion | None = None) list[ClientProxy] [소스]¶
Sample a number of Flower ClientProxy instances.
- unregister(client: ClientProxy) None [소스]¶
Flower ClientProxy 인스턴스 등록 해제.
This method is idempotent.
- 매개변수:
client (flwr.server.client_proxy.ClientProxy)
- wait_for(num_clients: int, timeout: int = 86400) bool [소스]¶
적어도 1개의 num_clients 가 사용 가능해질 때까지 기다리세요.
Blocks until the requested number of clients is available or until a timeout is reached. Current timeout default: 1 day.
- 매개변수:
num_clients (int) – The number of clients to wait for.
timeout (int) – The time in seconds to wait for, defaults to 86400 (24h).
- 반환:
success
- 반환 형식:
bool