federations_costs_slicing
This repository is the code basis of the paper intitled "The learning costs of Federated Learning in constrained scenarios"
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.4%) to scientific vocabulary
Keywords
Repository
This repository is the code basis of the paper intitled "The learning costs of Federated Learning in constrained scenarios"
Basic Info
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
dl_costs
Installing
To run the scenarios locally please install the requirements
pip install -r requirements.txt
If you want to run the experiments in RPIs please follow the rpi_setup_comands.md
If you want to run the experiments in docker please run docker compose up.
Running
To run locally you only need the following commands
mpirun -np 4 python mpi_training.py -d dataset/one_hot_encoding/
or
mpirun -np 4 python mpi_custom_training.py -d dataset/one_hot_encoding/
If you want to run the single_host setting you can run
python model.py
To run on docker you will need to connect to the master container
docker exec -it --user mpiuser dl_costs-master-1 bash
Connect one time to every worker to confirm the fingerprint of the server.
ssh worker1 and then exit
After this you can run the command
mpirun -np 4 -hostfile hostfile python mpi_training.py -d dataset
or
mpirun -np 4 -hostfile hostfile python mpi_custom_training.py -d dataset
inside the code folder.
To change the hyperparameters please confirm the available options in the mpitraining.py and mpicustom_training.py files
Results
The results obtained with the different hyperparameters are presented in the paper_results folder
the translation for the folder names is 10g50l -> (decentralized optimization with 10 global epochs and 50 local epochs) and fedsgd_64 -> (centralized optimization with batch size 64)
Authors
- Rafael Teixeira - rgtzths
License
This project is licensed under the MIT License - see the LICENSE file for details
Citation
If you use this code please site our work: Teixeira, Rafael & Antunes, Mário & Gomes, Diogo & Aguiar, Rui. (2023). The learning costs of Federated Learning in constrained scenarios. 10.1109/FiCloud58648.2023.00011.
Owner
- Name: Rafael Teixeira
- Login: rgtzths
- Kind: user
- Location: Aveiro
- Company: Instituto de Telecomunicações
- Repositories: 1
- Profile: https://github.com/rgtzths
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
message: "If you use this software, please cite it as bellow"
authors:
- family-names: "Rafael"
given-names: "Teixeira"
orcid: "https://orcid.org/0000-0000-0000-0000"
title: "dl_costs"
version: 1.0.0
doi: 10.1109/FiCloud58648.2023.00011
date-released: 2023-08-16
url: "https://github.com/rgtzths/dl_costs"
preferred-citation:
type: conference-paper
authors:
- family-names: "Teixeira"
given-names: "Rafael"
orcid: "https://orcid.org/0000-0001-7211-382X"
- family-names: "Antunes"
given-names: "Mário"
orcid: "https://orcid.org/0000-0002-6504-9441"
- family-names: "Gomes"
given-names: "Diogo"
orcid: "https://orcid.org/0000-0002-5848-2802"
- family-names: "Aguiar"
given-names: "Rui L."
orcid: "https://orcid.org/0000-0003-0107-6253"
title: "The learning costs of Federated Learning in constrained scenarios"
doi: 10.1109/FiCloud58648.2023.00011
conference:
name: "International Conference on Future Internet of Things and Cloud"
city: "Marrakesh"
region: "Marrakesh"
country: "Marocco"
date-start: 2023-08-14
date-end: 2023-08-16
GitHub Events
Total
Last Year
Dependencies
- tensorflow/tensorflow latest build
- matplotlib ==3.7.0
- mpi4py ==3.1.4
- pandas ==1.4.3
- scikit-learn ==1.1.2
- tensorflow ==2.10.0