@charles/paris-first-app
flwr new @charles/paris-first-appYour first Flower App
A two-parameter model, three deployed nodes, and two functions to change. No dataset download, PyTorch installation or GPU is needed.
Start with the workshop exercise.
flwr run . supergrid --federation @charles/flta --stream
The starter performs one gradient step per node on a synthetic quadratic loss. Each node has a different local optimum. The coordinator receives two model parameters from each node and combines them with a weighted average. FIRST_APP_ROUND prints each contribution and the aggregate. FIRST_APP_RESULT prints the final model parameters.
First edit first_app/client_app.py:local_train to return the vectors assigned in the exercise. Then edit first_app/server_app.py:aggregate_vectors to change the aggregation rule. Save and resubmit this local directory after each edit. The rest of the code supplies the normal Flower messages and round orchestration.
The parameters are tiny synthetic examples, not MNIST weights or accuracy. num-examples is a synthetic aggregation weight here. The starter uses equal weights; unequal-weights=true changes them to 1, 2 and 3 for the extension. The exercise does not read datasets, publish reports, or alter node processes.
The same ServerApp and ClientApp can be used with Flower simulations in an environment with the simulation extra and three virtual nodes. The classroom commands use the deployed federation.