APFL
¶
Implementation of the APFL [APFL20] algorithm.
References
[APFL20]
Yuyang Deng, Mohammad Mahdi Kamani, and Mehrdad Mahdavi. Adaptive Personalized Federated Learning. In arXiv (2020). URL: https://arxiv.org/abs/2003.13461
Classes included in fluke.algorithms.apfl
Classes¶
- class fluke.algorithms.apfl.APFLClient(index: int, model: Module, train_set: FastDataLoader, test_set: FastDataLoader, optimizer_cfg: OptimizerConfigurator, loss_fn: Module, local_epochs: int = 3, fine_tuning_epochs: int = 0, lam: float = 0.25, **kwargs: dict[str, Any])[source]¶
Bases:
PFLClient
- class fluke.algorithms.apfl.APFLServer(model: Module, test_set: FastDataLoader, clients: Iterable[Client], weighted: bool = False, tau: int = 3, **kwargs: dict[str, Any])[source]¶
Bases:
Server
- aggregate(eligible: Iterable[Client], client_models: Iterable[Module]) None [source]¶
Aggregate the models of the eligible clients every hyper_params.tau rounds.
- Parameters:
eligible (Iterable[Client]) – The clients that are eligible to participate in the aggregation.
client_models (Iterable[Module]) – The models of the clients to aggregate.