A Testbed Experiment Platform for testing Flower federated learning algorithms.
📑 Table of Contents
Flower Testbed is an open-source platform for experimenting with federated learning algorithms using the Flower framework. It provides a comprehensive environment for testing, monitoring, and managing federated learning experiments across different computational resources.
- Algorithm Management: Upload and test custom FL algorithms
- Model Tracking: Export model states at each federated round
- Metrics Monitoring: Real-time tracking of training metrics
- Multi-Framework Support: PyTorch, TensorFlow, sklearn, JAX, and more
- Resource Flexibility: CPU/GPU support with configurable client resources
- Node.js 20+
- pnpm
- Docker & Docker Compose
- Python 3.9+ (for Flower experiments)
Steps:
-
Clone the repository
git clone https://github.com/phrp720/flower-testbed.git cd flower-testbed -
Install dependencies
pnpm deps
-
Copy environment configuration
cp .env.example .env
-
Start PostgreSQL database
docker compose -f deployments/development/docker-compose.yml up -d
-
Push database schema
pnpm db:push
-
Start the development server
pnpm dev
-
Open the dashboard
Navigate to http://localhost:3000/ in your web browser.
The default credentials are
admin:admin
-
For each release, a
deployment.zipfile is provided.You can find it in the ReleasesThis archive contains everything required to deploy the application, including:
- The Flower application
- PostgreSQL
- A
.env.exampleexample file for configuration
-
Download and unzip the
deployment.zipfile. -
Open the
.env.examplefile, update the configuration values as needed and rename it to.env. -
Start the application using Docker Compose:
docker compose up -d
-
Select Framework: Choose your ML framework (PyTorch, TensorFlow, etc.)
-
Upload Files:
- Algorithm (required): Your FL strategy implementation (.py)
- Model (optional): Pre-trained model checkpoint (.pt, .pth)
- Config (optional): Training configuration (.py, .json, .yaml)
- Dataset (optional): Custom dataset implementation (.py, .csv)
-
Configure Parameters:
- Number of clients
- Number of rounds
- Client fraction (% of clients per round)
- Local epochs
- Learning rate
-
Start Experiment: Click "Start Experiment" to begin
Tip
You can download templates for Algorithm, Config,Strategy and Dataset files to get started quickly.
Note
The application supports only Pytorch for now. Support for TensorFlow is coming soon.
This is a research project. Contributions, issues, and feature requests are welcome!
This project is licensed under the MIT license.
See LICENSE for more information.