flower icon indicating copy to clipboard operation
flower copied to clipboard

Support proper export/serialization of `History`

Open lbhm opened this issue 3 years ago • 4 comments

Describe the type of feature and its functionality.

I noticed that flwr.server.History currently has no method for a structured export of its contents that enables straight-forward serialization.

Are there any reasons against implementing a to_dict() or to_json() method so that you can easily put you training results into a JSON file? If no, I would be happy to contribute a PR.

Describe step by step what files and adjustments are you planning to include.

Implement a method in flwr.server.History that returns all its information in a JSON serializable form.

Is there something else you want to add?

No response

lbhm avatar Jun 16 '23 13:06 lbhm

This is an indeed helpfull feature. Is there any plan to implement it in future? History in the simulation notebooks could be exported easily with some additional step. But the main issue on my opinion is the History during the multi-process (e.g. running flower-server and flower-client as separate processes). It is saved nowhere. The function that returns history is not assigned to anything.

letv3 avatar May 09 '24 07:05 letv3

Hi @lbhm,

This is great feature request. Would you be interested in opening up a PR? If not, maybe @letv3 is interested?

WilliamLindskog avatar Jan 28 '25 18:01 WilliamLindskog

Hi @WilliamLindskog,

I'm not working with Flower anymore in my current projects, so I cannot give you a timeline for when I will get to this. Therefore, it might be better to assign this feature to someone else.

lbhm avatar Jan 31 '25 14:01 lbhm

I see. Checked with the team and we'll close this for now. We are slowly moving away from the current History object. More news will follow in Flower AI Summit 2025. There is of course the option to create a custom function for this purpose but not something we are looking into right now.

Feel free to reopen if necessary.

WilliamLindskog avatar Jan 31 '25 18:01 WilliamLindskog