FedPSO Custom strategy

So i am trying to implement the strategy mentioned in this paper


The issue im facing right now is the getbestmodel method
Im not able to figure out how to do that second call to get the weights from client since aggreggate_fir gets called only once per global epoch
Any help is appreciated :smile:

Hi @wehtam , thanks for your question.
I think you actually donโ€™t need to have the GETBESTMODEL call to receive the model params from the specific client.
As you already have the gid which is essentially the client_id, and you can get the model for that client by its id at the server side. Does it make sense?

oh okay I am new to flower so where can i read about how that works or any similar code examples?

Here is a link that helps with the custom strategy: Use strategies - Flower Framework

Once you have a custom strategy, then you can access the model of each clients at the server side.