-
Notifications
You must be signed in to change notification settings - Fork 220
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
Add SWA #519
Add SWA #519
Conversation
@@ -25,6 +25,14 @@ def extend_fl_algo_cfg(cfg): | |||
cfg.fedprox.use = False | |||
cfg.fedprox.mu = 0. | |||
|
|||
# ---------------------------------------------------------------------- # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering whether it is appropriate to put SWA here. It is not an FL algorithm but just a trick to produce another solution from those in the late stage of a training course.
@@ -166,6 +166,9 @@ def _setup_server(self, resource_info=None, client_resource_info=None): | |||
if self.cfg.vertical.use: | |||
from federatedscope.vertical_fl.utils import wrap_vertical_server | |||
server = wrap_vertical_server(server, self.cfg) | |||
if self.cfg.fedswa.use: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation implies that, in the future, we'd better refactor the workers so that we would not need to make another worker class just for adding such a trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved.
This PR is linked to #517 .
Besides SWA, I support
merge_val
in global evaluation.