alibaba / alibaba/FederatedScope
Client-side model parameters NOT updated during the FedEx training
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
In https://github.com/alibaba/FederatedScope/blob/6dfe8d4474451c07cd7d69690a2df33a1f455f19/federatedscope/autotune/fedex/client.py#L30
the sampled hyperparams at the client are updated to ```self.trainer.cfg``` but they don't seem to take actual effect in client-side trainer.
For example, the ```dropout``` in the model (at https://github.com/alibaba/FederatedScope/blob/6dfe8d4474451c07cd7d69690a2df33a1f455f19/federatedscope/cv/model/cnn.py#L45C15-L45C22) is maintained by ```self.dropout``` but this variable is never updated during the FedEx training but instead ```model_config.dropout``` is updated which is never reused except during the initialization stage.
In other words, I think, similar to trainer.update() at https://github.com/alibaba/FederatedScope/blob/6dfe8d4474451c07cd7d69690a2df33a1f455f19/federatedscope/autotune/fedex/client.py#L46
we should have some function to update the dynamic hyperparameters in torch_trainer.py.
Please correct me if I missed something.
Edit:
The optimizer related hyperparams are indeed updated at https://github.com/alibaba/FederatedScope/blob/6dfe8d4474451c07cd7d69690a2df33a1f455f19/federatedscope/core/trainers/torch_trainer.py#L199 but kindly check if model related hyperparams (dropout) updated somewhere...
Contributor guide
No contributing guide indexed for this repository
Research direction
Trace the FedEx client flow in federatedscope/autotune/fedex/client.py and compare trainer.cfg updates with the model behavior in federatedscope/cv/model/cnn.py. Read the optimizer update path around line 199 of federatedscope/core/trainers/torch_trainer.py, then determine whether model hyperparameters such as dropout are updated after initialization. Done means the sampled model parameters take effect during client-side training.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100