p2pfl.learning.aggregators.scaffold moduleΒΆ
Callback for SCAFFOLD operations.
- class p2pfl.learning.aggregators.scaffold.Scaffold(global_lr=0.1, disable_partial_aggregation=False)[source]ΒΆ
Bases:
AggregatorSCAFFOLD Aggregator.
Paper: https://arxiv.org/pdf/1910.06378 The aggregator acts like the server in centralized learning, handling both model and control variate updates.
Due to the complete decentralization of the enviroment, a global model is also maintained in the aggregator. This consumes additional bandwidth.
::todo:: Improve efficiency by sharing the global model only each n rounds.
- Parameters:
global_lr (
float)disable_partial_aggregation (
bool)
- REQUIRED_INFO_KEYS = ['delta_y_i', 'delta_c_i']ΒΆ
-
SUPPORTS_PARTIAL_AGGREGATION:
bool= FalseΒΆ
- aggregate(models)[source]ΒΆ
Aggregate the models and control variates from clients.
- Parameters:
models (
list[P2PFLModel]) β List of models to aggregate.- Return type: