'Hello world' example of Flower Framework

Hi All, I am looking for a very basis ‘Hello World’ example of the Flower Framework without diving into Machine learning or AI (yet). I want to get the basics of the framework first (ClientApp, ServerApp, strategy, etc). I imagine two clients who have number 5 and 8. And the server Aggregates those numbers (13). From there I want to build on top of the basic (adding vectors, matrices, etc). I cannot find any such an example on the Internet.

Hi @herman , the closest to the super simple example you mention is the @flwrlabs/quickstart-numpy. It does something very similar to what you describe. The ClientApp will return a random scalar in its train method, and a vector of three random numbers in its evaluate method. The ServerApp aggregates those received scalar/vector following the standard FedAvg strategy.

I’d recommend you to first clone the example in your directory after installing flower:

 pip install -U flwr

# get the app
flwr new @flwrlabs/quickstart-numpy

Then you can open the quickstart-numpy directory to inspect the code. Or run it directly via:

cd quickstart-numpy
flwr run . --stream

This simple app is equivalent to the one presented in the Flower Tutorial. I recommend going through the first three sections:

  1. What is federated learning ?
  2. Get started with Flower (no code)
  3. Write your first Flower App