ClientManager

class ClientManager[소스]

기반 클래스: ABC

Flower 클라이언트를 관리하기 위한 Abstract base class.

메소드

all()

Return all available clients.

num_available()

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 가 사용 가능해질 때까지 기다리세요.

abstract all() dict[str, ClientProxy][소스]

Return all available clients.

abstract num_available() int[소스]

Return the number of available clients.

반환:

num_available – The number of currently available clients.

반환 형식:

int

abstract register(client: ClientProxy) bool[소스]

Register Flower ClientProxy instance.

매개변수:

client (flwr.server.client_proxy.ClientProxy) – The ClientProxy of the Client to register.

반환:

success – Indicating if registration was successful. False if ClientProxy is already registered or can not be registered for any reason.

반환 형식:

bool

abstract sample(num_clients: int, min_num_clients: int | None = None, criterion: Criterion | None = None) list[ClientProxy][소스]

Sample a number of Flower ClientProxy instances.

abstract unregister(client: ClientProxy) None[소스]

Flower ClientProxy 인스턴스 등록 해제.

This method is idempotent.

매개변수:

client (flwr.server.client_proxy.ClientProxy) – The ClientProxy of the Client to unregister.

abstract wait_for(num_clients: int, timeout: int) bool[소스]

적어도 1개의 num_clients 가 사용 가능해질 때까지 기다리세요.