Skip to content

Quickstart: Run a Local FL Simulation

The first exercise should be a local simulation using synthetic data. This proves that the FL loop works before the team invests in cloud infrastructure, certificates, secure aggregation quorums, or governance workflows.

The reference repository provides a small smoke task that can be run on a laptop. It uses synthetic data and does not require GCC resources or any real personal data.

Terminal window
git clone https://go.gov.sg/privacy-fl-github
cd fl-reference
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
flwr run . local-sim --run-config 'task=smoke num-server-rounds=5'

3.2 What the quickstart should demonstrate

Section titled “3.2 What the quickstart should demonstrate”
Expected resultWhy it matters
The server starts and waits for simulated clients.Confirms that the coordinator application is correctly wired.
Two or more simulated clients train locally on synthetic data.Confirms that the client application and task definition are working.
The aggregation strategy completes multiple rounds.Confirms that model updates can be collected and aggregated.
Round-level metrics are printed and saved.Confirms that evaluation and logging are available.
A run record is created locally.Confirms that runs can be traced and inspected.
  • It does not prove network connectivity between separate organisations.

  • It does not prove certificate issuance, revocation, or mTLS enforcement.

  • It does not prove secure aggregation quorum behaviour under client dropout.

  • It does not prove that DP settings are appropriate for a real dataset.

  • It does not prove that the use case is lawful, approved, or production-ready.

A team has completed the quickstart successfully when it can explain, using its own logs, how a model was distributed, trained locally by clients, aggregated by the coordinator, and evaluated across rounds. This is the minimum shared understanding needed before moving to cloud deployment.