Federated Learning Utility framework for Experimentation and research.
Project description
fluke: federated learning utility framework for experimentation and research
fluke
is a Python package that provides a framework for federated learning research. It is designed to be modular and extensible, allowing researchers to easily implement and test new federated learning algorithms. fluke
provides a set of pre-implemented state-of-the-art federated learning algorithms that can be used as a starting point for research or as a benchmark for comparison.
Installation
Pypi
fluke
is a Python package that can be installed via pip. To install it, you can run the following command:
pip install fluke-fl
Clone the repository
You can also install fluke
by cloning the repository and installing it in editable mode. This is useful if you want to contribute to the development of fluke
or if you want to use the latest version of the code.
git clone https://github.com/makgyver/fluke.git
cd fluke
pip install -e .
[!WARNING] Due to a recent repository tree refactoring, if you cloned the repository before June 2025, you need to reclone it to get the latest version of the code.
🐳 Docker
You can use this library directly inside a Docker container — no installation needed on your local machine.
docker build -t fluke_container .
Then, you can run an interactive session with
docker run --rm fluke_container fluke [ARGS]
where ARGS
are the arguments you want to pass to the fluke
command as described in the next section.
Run a federated algorithm
To run an algorithm in fluke
you need to create two configuration files:
EXP_CONFIG
: the experiment configuration file (independent from the algorithm);ALG_CONFIG
: the algorithm configuration file;
Then, you can run the following command:
fluke federation EXP_CONFIG ALG_CONFIG
You can find some examples of these files in the configs folder of the repository.
Example
Let say you want to run the classic FedAvg
algorithm on the MNIST
dataset. Then, using the configuration files exp.yaml and fedavg.yaml, you can run the following command:
fluke federation path_to_folder/exp.yaml path_to_folder/fedavg.yaml
where path_to_folder
is the path to the folder containing the configuration files.
Documentation
The documentation for fluke
can be found here. It contains detailed information about the package, including how to install it, how to run an experiment, and how to implement new algorithms.
Tutorials
Tutorials on how to use fluke
can be found here. In the following, you can find some quick tutorials to get started with fluke
:
- Getting started with
fluke
API - Run your algorithm in
fluke
- Use your own model with
fluke
- Add your dataset and use it with
fluke
- Add your custom evaluation metric in
fluke
Contributing
If you have suggestions for how fluke
could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the Contributing Guide.
fluke
@ ECML-PKDD 2024
fluke
has been presented at the ECML-PKDD 2024 conference in the Workshop on Advancements in Federated Learning. The slides of the presentation are available here.
Citing fluke
fluke
is a research tool, and we kindly ask you to cite it in your research papers if you use it. You can use the following BibTeX entry:
@misc{polato2024fluke,
title={fluke: Federated Learning Utility frameworK for Experimentation and research},
author={Mirko Polato},
year={2024},
eprint={2412.15728},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2412.15728},
}
Authors and main contributors
- Mirko Polato - Idealization, Design, Development, Testing, Tutorial, and Documentation
- Roberto Esposito - Testing
- Samuele Fonio - Testing, Tutorial
- Edoardo Oglietti - Testing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fluke_fl-0.7.9.tar.gz
.
File metadata
- Download URL: fluke_fl-0.7.9.tar.gz
- Upload date:
- Size: 145.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e94f37708725b737f1550ba5dd77247df6a5255ccb7164742e2826e73fa27433
|
|
MD5 |
dc5dd7aa3ab16e7014eac2341a2b02d7
|
|
BLAKE2b-256 |
04a2466caffb4d1f40ac74496306d67abeb4eb3027991aa419fc1a5bf51b9357
|
File details
Details for the file fluke_fl-0.7.9-py3-none-any.whl
.
File metadata
- Download URL: fluke_fl-0.7.9-py3-none-any.whl
- Upload date:
- Size: 164.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e44179f9e6ca1c8dd522dd12ec0339898689bd2bd8df21399512c4c1de3741f7
|
|
MD5 |
5f4ee019458ef2292cd27d881da11dd0
|
|
BLAKE2b-256 |
d5d549d24777b6e80ad90adf82b6136cd44c250c939abb7c9f1ce6ac1a2e8d37
|