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)[소스]

기반 클래스: DPFedAvgFixed

Wrapper for configuring a Strategy for DP with Adaptive Clipping.

경고

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

메소드

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]][소스]

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.

매개변수:
  • server_round (int) – The current round of federated learning.

  • parameters (Parameters) – 현재(전역) 모델 매개변수입니다.

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

반환:

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.

반환 형식:

List[Tuple[ClientProxy, EvaluateIns]]

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

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.