fedscale.cloud package¶
Subpackages¶
- fedscale.cloud.aggregation package
- fedscale.cloud.execution package
- Submodules
- fedscale.cloud.execution.client_base module
- fedscale.cloud.execution.data_processor module
- fedscale.cloud.execution.executor module
- fedscale.cloud.execution.optimizers module
- fedscale.cloud.execution.rl_client module
- fedscale.cloud.execution.tensorflow_client module
- fedscale.cloud.execution.torch_client module
- Module contents
Submodules¶
fedscale.cloud.client_manager module¶
- class fedscale.cloud.client_manager.ClientManager(mode, args, sample_seed=233)[source]¶
Bases:
object
- register_client(host_id: int, client_id: int, size: int, speed: Dict[str, float], duration: float = 1) None [source]¶
Register client information to the client manager.
- Parameters:
host_id (int) – executor Id.
client_id (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(client_id: 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:
client_id (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]