DPFedAvgAdaptive¶

class DPFedAvgAdaptive(strategy: Strategy, num_sampled_clients: int, init_clip_norm: float = 0.1, noise_multiplier: float = 1.0, server_side_noising: bool = True, clip_norm_lr: float = 0.2, clip_norm_target_quantile: float = 0.5, clip_count_stddev: float | None = None)[source]¶

Bases: DPFedAvgFixed

Wrapper for configuring a Strategy for DP with Adaptive Clipping.

Warning

This class is deprecated and will be removed in a future release.

Methods

aggregate_evaluate(server_round, results, ...)

Aggregate evaluation losses using the given strategy.

aggregate_fit(server_round, results, failures)

Aggregate training results as in DPFedAvgFixed and update clip norms.

configure_evaluate(server_round, parameters, ...)

Configure the next round of evaluation using the specified strategy.

configure_fit(server_round, parameters, ...)

Configure the next round of training.

evaluate(server_round, parameters)

Evaluate model parameters using an evaluation function from the strategy.

initialize_parameters(client_manager)

Initialize global model parameters using given strategy.

aggregate_evaluate(server_round: int, results: list[tuple[ClientProxy, EvaluateRes]], failures: list[tuple[ClientProxy, EvaluateRes] | BaseException]) tuple[float | None, dict[str, bool | bytes | float | int | str]]¶

Aggregate evaluation losses using the given strategy.

aggregate_fit(server_round: int, results: list[tuple[ClientProxy, FitRes]], failures: list[tuple[ClientProxy, FitRes] | BaseException]) tuple[Parameters | None, dict[str, bool | bytes | float | int | str]][source]¶

Aggregate training results as in DPFedAvgFixed and update clip norms.

configure_evaluate(server_round: int, parameters: Parameters, client_manager: ClientManager) list[tuple[ClientProxy, EvaluateIns]]¶

Configure the next round of evaluation using the specified strategy.

Parameters:
  • server_round (int) – The current round of federated learning.

  • parameters (Parameters) – The current (global) model parameters.

  • client_manager (ClientManager) – The client manager which holds all currently connected clients.

Returns:

evaluate_configuration – A list of tuples. Each tuple in the list identifies a ClientProxy and the EvaluateIns for this particular ClientProxy. If a particular ClientProxy is not included in this list, it means that this ClientProxy will not participate in the next round of federated evaluation.

Return type:

List[Tuple[ClientProxy, EvaluateIns]]

configure_fit(server_round: int, parameters: Parameters, client_manager: ClientManager) list[tuple[ClientProxy, FitIns]][source]¶

Configure the next round of training.

evaluate(server_round: int, parameters: Parameters) tuple[float, dict[str, bool | bytes | float | int | str]] | None¶

Evaluate model parameters using an evaluation function from the strategy.

initialize_parameters(client_manager: ClientManager) Parameters | None¶

Initialize global model parameters using given strategy.