Skip to content

Commit

Permalink
Fix the path to save the policy of FedEx (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
joneswong authored Jun 5, 2022
1 parent 93fe045 commit e2e1cc9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions federatedscope/autotune/fedex/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,11 @@ def check_and_save(self):

if self._cfg.federate.save_to != '':
# save the policy
with open(os.path.join(self._cfg.outdir, "policy.npy"),
'wb') as ops:

pi_ckpt_path = self._cfg.federate.save_to[:self._cfg.federate.
save_to.rfind(
'.')] + "_pi.npy"
with open(pi_ckpt_path, 'wb') as ops:
np.save(ops, self._z)

if self.model_num > 1:
Expand Down

0 comments on commit e2e1cc9

Please sign in to comment.