mspronesti / beta-federated

Federated Learning with flower and pytorch using a metaheuristic based on the beta distribution
MIT License
6 stars 0 forks source link
fedavg federated-learning flower pytorch tensorflow

Federated Learning

Federated learning with flower, pytorch and tensorflow.

Dependencies

You can install the required dependencies running

pip install -r requirements.txt

Usage

Just play around with the hydra configuration file to set the hyperparameters and run server.py

cd fed_torch
python server.py

In case you have any problem with imports, try setting the PYTHONPATH environment variable in your virtual environment

export PYTHONPATH=$PYTHONPATH:`pwd`

Development Notes

Install development requirements running

pip install -r requirements-dev.txt

and run the tests with

python -m pytest

Make sure to install the required hooks for pre-commit before committing , running

pre-commit install

which will ensure pre-commit will run at git commit.