adap / flower

Flower: A Friendly Federated Learning Framework
https://flower.ai
Apache License 2.0
4.46k stars 786 forks source link

FedPG-BR #2046

Open jafermarq opened 1 year ago

jafermarq commented 1 year ago

FedPG-BR

Do you want to work on this baseline?

🌻 Check everything about the Summer of Reproducibility on flower.dev/summer

All available baselines are listed in the Summer of Reproducibility Dashboard and also in the GitHub Issues with the summer-of-reproducibility label. The content is the same.

πŸ“ It is advised to complete these steps before your start working on your code. But if you can't wait to implement your baseline with Flower (we totally understand it πŸ˜„), please ensure you follow the steps on how to contribute a new baseline.

What follows are the steps 1 & 2 in the Summer of Reproducibility instructions.

1. Join the Summer of Reproducibility program

What happens next?

Is something wrong or not clear ?

flint-xf-fan commented 11 months ago

Hi @jafermarq

This is the contribution plan I'd like to propose:

Let me know your thoughts and yes, I am eligible for the reward.

Cheers, Flint

jafermarq commented 11 months ago

Hi @flint-xf-fan, thanks for getting back to us with this detailed plan. Reproducing the results in Figure 2 sounds good. I'll look into how integrating OpenAi's gymnasium can be done with how Flower's server <--> client interactions work. Please give me a couple of days and i'll get back to you regarding this. I'll βœ… some the points above in the description of the issue and add you as assignee.

jafermarq commented 11 months ago

Hi @flint-xf-fan , after looking into your paper more closely: wouldn't it be sufficient if all clients and the server have their own gym instantiation? Then, the clients sample a batch of trajectories independently, obtain gradients and communicate them to the server. Most examples in Flower show how to send the entire model back to the server, but adjusting it to instead communicate the gradients isn't difficult (it just requires adjusting the get_parameters() method in the flower clients). Then the server updates the policy. My understanding is that the server does also need a gym instance to do line 11 in Algo1.

If having multiple gym instances is a problem (maybe due to compute/memory resources needed to support that), we could think of alternatives.

flint-xf-fan commented 10 months ago

Hi @jafermarq, that sounds the right approach. I have gone through some tutorials on Flower, and I would like to start the implementation, as you suggested:

yining043 commented 9 months ago

Hi @jafermarq I am another author of FedPG-BR and am working with @flint-xf-fan on this. We are planing to submit the PR by end of this week. Can you add me as contributor to this issue?

jafermarq commented 9 months ago

It's great to have you on board also @yining043 ! You are now a contributor.