Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrayraykk committed Feb 10, 2023
1 parent 24844fb commit b8c4c59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion federatedscope/core/workers/wrapper/fedswa.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def check_and_move_on(self,
model.state_dict() for model in self.models
]
self.swa_rnd = 1
self.eval_swa = False
elif self.state > \
self._cfg.fedswa.start_rnd and \
(self.state - self._cfg.fedswa.start_rnd) % \
Expand Down Expand Up @@ -212,6 +211,7 @@ def save_best_results(self):
self._monitor.save_formatted_results(formatted_best_res)

# Bind method to instance
setattr(server, 'eval_swa', False)
server.check_and_move_on = types.MethodType(check_and_move_on, server)
server.eval = types.MethodType(eval, server)
server.check_and_save = types.MethodType(check_and_save, server)
Expand Down
6 changes: 3 additions & 3 deletions scripts/example_configs/fedswa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ early_stop:
seed: 12345
federate:
mode: standalone
total_round_num: 6
total_round_num: 100
sample_client_rate: 0.1
make_global_eval: True
merge_test_data: True
merge_val_data: True
fedswa:
use: True
freq: 3
start_rnd: 2
freq: 10
start_rnd: 75
data:
root: data/
type: femnist
Expand Down

0 comments on commit b8c4c59

Please sign in to comment.