Skip to content

Simple PyTorch implentation of the FedAvg algorithm in FL Simulation Framework

License

Notifications You must be signed in to change notification settings

SamuelHorvath/Simple_FL_Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplistic Federated Learning Simulator

This repo was created to provide a good base for experimenting with federated learning methods with minimal requirements and complexity.

This repo contains a PyTorch implementation of Generalized FedAvg (Algorithm 1), where the user has several degrees of freedom in terms of algorithmic design. In particular, the user can define:

  • global and local optimizers (SGD is implemented)
  • aggregation scheme (simple mean is implemented)
  • client sampling (uniform sampling is implemented)

The source code is provided in the fl_sim directory. The user can extend the usability by implementing new aggregation schemes (fl_sim/aggregation), client samplings (fl_sim/client_sampling, or by bringing in new models (fl_sim/models and datasets (fl_sim/data_funcs. The user can also define a new task in tasks.py. The repo also contains two notebooks. The first notebook contains an example of a simple task, where it generates the script to run experiments via terminal. The second notebook provides means to visualize obtained results.

More Advanced FL Frameworks

For more advanced FL simulators based on PyTorch, we recommend

If you are looking for a framework that goes beyond simple simulations, we recommend

About

Simple PyTorch implentation of the FedAvg algorithm in FL Simulation Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published