Closed hariy-v closed 2 months ago
Hi,
Yes, it is possible. To do so, you will need to use low-level API. As a good starting point, I would recommend getting familiar with this example https://github.com/adap/flower/tree/main/examples/app-pytorch. server_low_level.py
is crucial. Here is also a migration guide, but it does not go into low-level details: https://flower.ai/docs/framework/how-to-upgrade-to-flower-next.html#upgrade-to-flower-next.
In essence, you can create anything you need in the server by creating a main()
function with@app.main()
Specific Queries
Question
I am exploring the use of different federated learning algorithms in scenarios where the performance of one might falter due to specific data distributions among clients.
I would like to know if it's currently possible, or if there are any existing strategies within the framework, to dynamically switch from one algorithm (e.g., FedAvg) to another (e.g., FedProx) based on real-time performance metrics.
For instance, starting a training session with FedAvg and then, based on the observed model performance or other metrics, automatically switching to FedProx if the results do not meet certain thresholds.
Specific Queries