fedscale.core package¶
Subpackages¶
Submodules¶
fedscale.core.client_manager module¶
- class fedscale.core.client_manager.clientManager(mode, args, sample_seed=233)[source]¶
Bases:
object
- register_client(hostId: int, clientId: int, size: int, speed: Dict[str, float], duration: float = 1) None [source]¶
Register client information to the client manager.
- Parameters:
hostId (int) – executor Id.
clientId (int) – client Id.
size (int) – number of samples on this client.
speed (Dict[str, float]) – device speed (e.g., compuutation and communication).
duration (float) – execution latency.
- register_feedback(clientId: int, reward: float, auxi: float = 1.0, time_stamp: float = 0, duration: float = 1.0, success: bool = True) None [source]¶
Collect client execution feedbacks of last round.
- Parameters:
clientId (int) – client Id.
reward (float) – execution utilities (processed feedbacks).
auxi (float) – unprocessed feedbacks.
time_stamp (float) – current wall clock time.
duration (float) – system execution duration.
success (bool) – whether this client runs successfully.
- select_participants(num_of_clients: int, cur_time: float = 0) List[int] [source]¶
Select participating clients for current execution task.
- Parameters:
num_of_clients (int) – number of participants to select.
cur_time (float) – current wall clock time.
- Returns:
indices of selected clients.
- Return type:
List[int]