How to launch Flower Next style simulation in multinodes

As the title suggests, I would like to run a Flower simulation on multiple nodes. I have referred to the following documentation Multi-node Flower simulations, but the provided solution does not seem to match the current version’s style of Flower’s ServerApp/ClientApp. Could you please advise on how to run a simulation on multiple nodes for Flower Next-style applications using the example of
quickstart-pytorch ?

PS: From my observation, I guess that modifying the configuration in pyproject.toml might be a solution that aligns with the current Flower design philosophy. Is it right ?

Also, for multi-node execution that is not a simulation, apart from the methods mentioned in the documentation upgrade-to-flower-next#deployment, is it possible to run it directly using flwr run by modifying the configuration?

PPS: When manually calling the method *run_simulation* like run_simulation(server_app=server_app, client_app=client_app,num_supernodes=10), how to pass the Context to ServerApp and ClientApp.

2 Likes

Hi @tslehbdphj3px53 to run a multi-node simulation you’d need to follow the same steps are were required before:

  1. startup the ray setup: this mean running ray start --head (in the node where you’ll eventually start the experiment via flwr run ), then copy the command shown in response to ray start --head in other nodes (in the same network!) to attache them to the head node.
  2. In your head node, do flwr run . as usual.

As far as your second question about the Context: it’s not possible to pass the context since it only begins when the run has started. The run_simulation command is better used in setups like jupyter/colab but it’s not recommended outside it since it doesn’t allow taking advantages built for flwr run ...

I hope this helps!!