A blazing-fast and lightweight simulation framework for Federated Learning.
Project description
Why Choose BlazeFL?
-
🚀 High Performance: Optimized for single-node simulations, BlazeFL allows you to adjust the degree of parallelism. For example, if you want to simulate 100 clients on a single node but lack the resources to run them all concurrently, you can configure 10 parallel processes to manage the simulation efficiently.
-
🔧 Extensibility: BlazeFL provides interfaces solely for communication and parallelization, avoiding excessive abstraction. This design ensures that the framework remains flexible and adaptable to various use cases.
-
📦 Minimal Dependencies: Minimal Dependencies: The core components of BlazeFL rely only on PyTorch, ensuring a lightweight and straightforward setup.
-
🔄 Robust Reproducibility: Even in multi-process environments, BlazeFL offers utilities to save and restore seed states, ensuring consistent and reproducible results across simulations.
-
🏷️ Type Hint Support: The framework fully supports type hints, enhancing code readability and maintainability.
-
🔗 Loose Compatibility with FedLab: Inspired by FedLab, BlazeFL maintains a degree of compatibility, facilitating an easy transition to production-level implementations when necessary.
How BlazeFL Works
BlazeFL enhances performance by storing shared parameters on disk instead of shared memory, enabling efficient parameter sharing across processes, simplifying memory management, and reducing overhead.
Quick Start
Installation
BlazeFL is available on PyPI and can be installed using your preferred package manager.
For example:
uv add blazefl
# or
poetry add blazefl
# or
pip install blazefl
Running Examples
Quick start code is in examples/quickstart-fedavg.
For a more detailed implementation guide, checkout the examples/step-by-step-dsfl.
FL Simulation Benchmarks
Benchmarks were conducted using Google Cloud’s Compute Engine with the following specifications:
Machine Configuration
- Machine Type: a2-highgpu-1g (vCPU count: 12, VM memory: 85 GB)
- CPU Platform: Intel Cascade Lake
- GPU: 1 x NVIDIA A100 40GB
- Boot Disk: 250 GB SSD
Benchmark Setup
For benchmarking purposes, we utilized Flower’s Quickstart Example as a baseline to evaluate BlazeFL’s performance and efficiency.
Contributing
We welcome contributions from the community! If you'd like to contribute to this project, please follow these guidelines:
Issues
If you encounter a bug, have a feature request, or would like to suggest an improvement, please open an issue on the GitHub repository. Make sure to provide detailed information about the problem or suggestion.
Pull Requests
We gladly accept pull requests! Before submitting a pull request, please ensure the following:
- Fork the repository and create your branch from main.
- Ensure your code adheres to the project's coding standards.
- Test your changes thoroughly.
- Make sure your commits are descriptive and well-documented.
- Update the README and any relevant documentation if necessary.
Code of Conduct
Please note that this project is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report any unacceptable behavior.
Thank you for contributing to our project!
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blazefl-1.1.0.tar.gz.
File metadata
- Download URL: blazefl-1.1.0.tar.gz
- Upload date:
- Size: 592.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ba93863e4a88d3e417a2745cdfe01f96132ef35923863be8eadd7f3e89116b
|
|
| MD5 |
bca0797e7de351f0a3cd50d53321d6d5
|
|
| BLAKE2b-256 |
87f6c31a4f3c97a7cc3a022cf2be3dee67a276cb102a5911998b0f8a12adbb6b
|
Provenance
The following attestation bundles were made for blazefl-1.1.0.tar.gz:
Publisher:
publish.yaml on kitsuyaazuma/blazefl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blazefl-1.1.0.tar.gz -
Subject digest:
36ba93863e4a88d3e417a2745cdfe01f96132ef35923863be8eadd7f3e89116b - Sigstore transparency entry: 230579868
- Sigstore integration time:
-
Permalink:
kitsuyaazuma/blazefl@2390a155a3a2933d80a1ff3b961424f08733db8b -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kitsuyaazuma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2390a155a3a2933d80a1ff3b961424f08733db8b -
Trigger Event:
release
-
Statement type:
File details
Details for the file blazefl-1.1.0-py3-none-any.whl.
File metadata
- Download URL: blazefl-1.1.0-py3-none-any.whl
- Upload date:
- Size: 20.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eef69a8ae8f8dd9ef4eb27bfabb92e2b825af54e92624f72e1313557cfc2098
|
|
| MD5 |
b8020df617d83eaded9c3b8f81a753be
|
|
| BLAKE2b-256 |
0e395e5f660663f5565c40e5c6534d80346d5f360f85e0d9c2ff8ee33f031726
|
Provenance
The following attestation bundles were made for blazefl-1.1.0-py3-none-any.whl:
Publisher:
publish.yaml on kitsuyaazuma/blazefl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blazefl-1.1.0-py3-none-any.whl -
Subject digest:
1eef69a8ae8f8dd9ef4eb27bfabb92e2b825af54e92624f72e1313557cfc2098 - Sigstore transparency entry: 230579870
- Sigstore integration time:
-
Permalink:
kitsuyaazuma/blazefl@2390a155a3a2933d80a1ff3b961424f08733db8b -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kitsuyaazuma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@2390a155a3a2933d80a1ff3b961424f08733db8b -
Trigger Event:
release
-
Statement type: