Skip to content

decentralized personalized federated learning with dynamic aggregation

License

Notifications You must be signed in to change notification settings

EricLoong/da-dpfl

Repository files navigation

‘DA-DPFL’: Dynamic Aggregation & Decentralized Personalized Federated Learning

Running Environment:

Python Python

Structure (description of folders)

data

  • the folder to store the data

fedml_api (interface for multiple modules)

  • data_preprocessing: processing tools

  • model: the folder to store the model (parent models) and training tools

  • standalone: the folder to store the different algorithms

    • client.py: the functions executed in client such as training and pruning

    • api.py: the functions executed in the server, i.e. aggregation, and the whole logic in algorithm.

    • model_trainer.py: store the class of model for corresponding algorithm

  • utils: the folder to store the tools for logging, FLOPS computation, etc.

fedml_core

  • the folder to store the core functions of FedML

fedml_xxx

  • main running interface for different baselines, where .sh files stored.

Example to use the code:

Change the directory to the root of the your project

replace work_dir

/nfs/da-dpfl/

in config.yaml with the root of your project

/your_path_to_project/

Install dependencies and setup the permissions

pip3 install -r requirements.txt
sh setup_permission.sh

Run CIFAR10 experiments

Format - sh /your_directory/algorithm_name/data_name.sh

- sh /your_path_to_fedml/fedml_adpfl/cifar10.sh
- sh /your_path_to_fedml/fedml_dispfl/cifar10.sh

Acknowledgements (Codes)

About

decentralized personalized federated learning with dynamic aggregation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published