Closed junzlovegood closed 7 months ago
You'll need to update your configuration settings. Please set cfg.federate.save_client_model
to True. Additionally, you must specify a valid file path for the cfg.federate.save_to
where the client model should be saved.
If you have any further questions or encounter any issues, feel free to reach out.
I update the configuration settings in the yarm file as follow:
federate:
mode: standalone
save_client_model: True
but it raise an error:
raise KeyError("Non-existent config key: {}".format(full_key))
KeyError: 'Non-existent config key: federate.save_client_model'
It doesn't work for me.
My bad for this feature only exists in the llm
branch. Could you switch to llm
branch to use this feature?
In federatedscope/core/workers/client.py:
if update_best_this_round and self._cfg.federate.save_client_model:
path = add_prefix_to_path(f'client_{self.ID}_',
self._cfg.federate.save_to)
self.trainer.save_model(path, self.state)
in federatedscope/core/configs/cfg_fl_setting.py
cfg.federate.save_client_model = False
hi, how do I save the model generated by the client in the Personalized Federated Learning Settings? Thanks.