Skip to main content

Coveralls PyPI - Python Version GitHub License

FGCS Docker

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 Open in Colab
  • Run your algorithm in fluke Open in Colab
  • Use your own model with fluke Open in Colab
  • Add your dataset and use it with fluke Open in Colab
  • Add your custom evaluation metric in fluke Open in Colab

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.

fluke @ ECAI 2025

On 25th October, we will deliver a tutorial on fluke at the 28th European Conference on Artificial Intelligence (ECAI). Here the website of the tutorial.

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:

@article{fluke2025fgcs,
	title = {Fluke: Federated learning utility framework for experimentation and research},
	journal = {Future Generation Computer Systems},
	volume = {177},
	pages = {108241},
	year = {2026},
	issn = {0167-739X},
	doi = {https://doi.org/10.1016/j.future.2025.108241},
	url = {https://www.sciencedirect.com/science/article/pii/S0167739X25005357},
	author = {Mirko Polato}
}

Authors and main contributors

Metadata

Release files for fluke-fl 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fluke-fl 0.8.1
File Size Uploaded
fluke_fl-0.8.1.tar.gz 156.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fluke-fl 0.8.1
File Interpreter ABI Platform
fluke_fl-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 331.5 kB

Release files / fluke_fl-0.8.1.tar.gz

Download URL fluke_fl-0.8.1.tar.gz
Size 156.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5325954c5f197196d9e1b3dfd953edd77f82b79753763b44ccdcf6d0aaa02682
BLAKE2b-256 checksum
How to use checksums
1004f8b7ac265ffc059c497210a67cf6fc9f14669bfe1eddef110d29138096d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / fluke_fl-0.8.1-py3-none-any.whl

Download URL fluke_fl-0.8.1-py3-none-any.whl
Size 175.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
100c11d2049acf77fc9412aacc18b2d71e15b57de5c46397486689ece4d7a892
BLAKE2b-256 checksum
How to use checksums
e87aad1d38f53328e3e85d7d46fb3e782098b93d3553f143accb2bc25566d67e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.4

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.5.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page