SimpleClientManagerยถ

class SimpleClientManager[์†Œ์Šค]ยถ

๊ธฐ๋ฐ˜ ํด๋ž˜์Šค: ClientManager

์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ํด๋ผ์ด์–ธํŠธ ๊ทธ๋ฃน ์ œ๊ณต.

๋ฉ”์†Œ๋“œ

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 ๊ฐ€ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ด์งˆ ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฌ์„ธ์š”.

all() dict[str, ClientProxy][์†Œ์Šค]ยถ

Return all available 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