/p2pfl

P2P Federated Learning (p2pfl) is a decentralized federated learning library, it allows creating basic federated learning systems on p2p networks using gossip protocols.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

GitHub Logo

P2PFL - Federated Learning over P2P networks

GitHub license GitHub issues GitHub contributors GitHub forks GitHub stars GitHub activity Coverage badge Slack

P2PFL is a general-purpose open-source library for the execution (simulated and in real environments) of Decentralized Federated Learning systems, specifically making use of P2P networks and the Gossip protocol.

โœจ Key Features

P2PFL offers a range of features designed to make decentralized federated learning accessible and efficient. For detailed information, please refer to our documentation.

Feature Description
๐Ÿš€ Easy to Use Get started quickly with our intuitive API.
๐Ÿ›ก๏ธ Reliable Built for fault tolerance and resilience.
๐ŸŒ Scalable Leverages the power of peer-to-peer networks.
๐Ÿงช Versatile Experiment in simulated or real-world environments.
๐Ÿ”’ Private Prioritizes data privacy with decentralized architecture.
๐Ÿงฉ Flexible Integrate with PyTorch and TensorFlow (coming soon!).
๐Ÿ“ˆ Real-time Monitoring Manage and track experiment through P2PFL Web Services.
๐Ÿง  Model Agnostic Use any machine learning model you prefer (e.g., PyTorch models).
๐Ÿ“ก Communication Protocol Agnostic Choose the communication protocol that best suits your needs (e.g., gRPC).

๐Ÿ“ฅ Installation

Note: We recommend using Python 3.9 or lower. We have found some compatibility issues with Python 3.10 and PyTorch.

๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป For Users

pip install "p2pfl[torch]"

๐Ÿ‘จ๐Ÿผโ€๐Ÿ”ง For Developers

๐Ÿ Python (using Poetry)

git clone https://github.com/pguijas/p2pfl.git
cd p2pfl
poetry install -E torch 

Note: Use the extras (-E) flag to install specific dependencies (e.g., -E torch). Use --no-dev to exclude development dependencies.

๐Ÿณ Docker

docker build -t p2pfl .
docker run -it --rm p2pfl bash

๐ŸŽฌ Quickstart

To start using P2PFL, follow our quickstart guide in the documentation.

๐Ÿ“š Documentation & Resources

๐Ÿค Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines. Please adhere to the project's code of conduct in CODE_OF_CONDUCT.md.

๐Ÿ’ฌ Community

Connect with us and stay updated:

โญ Star History

A big thank you to the community for your interest in P2PFL! We appreciate your support and contributions.

Star History Chart

๐Ÿ“œ License

GNU General Public License, Version 3.0