Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback to save local model weights at client when the FL round ends #3941

Open
paloma-jim opened this issue Jul 29, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@paloma-jim
Copy link

What is your question?

Hi,
I am a newbie in Flower. I have been implementing a training pipeline with two servers and around 20 clients with a custom dataset for 100 FL rounds in flower==1.9.0 with pytorch. My code is based on the example provided here:
After doing the code, i want to implement a callback function in each client that saves the last local model (after performing the last training round) and calculates a hash function based on the weights of this last model. Could you provide me some insights on how to proceed?
Thank you in advance

@paloma-jim paloma-jim added the question Further information is requested label Jul 29, 2024
@danieljanes
Copy link
Member

Hi @paloma-jim, before answering your question, I want to recommend updating to Flower 1.10 (a big upgrade over 1.9).

Regarding your question: you could easily do this in the Client's fit method itself (client.py, between lines 80 and 83).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants