Skip to content

Commit

Permalink
update parameter values in checkpointing
Browse files Browse the repository at this point in the history
  • Loading branch information
aoymt committed Aug 17, 2024
1 parent d1a4af4 commit aeedd3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/py2dmat/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def main():
elif args.resume is True:
run_mode = "resume"
if args.reset_rand is True:
run_mode = "resume-initrand"
run_mode = "resume-resetrand"
elif args.cont is True:
run_mode = "continue"
if args.reset_rand is True:
run_mode = "continue-initrand"
run_mode = "continue-resetrand"
else:
run_mode = "initial" # default

Expand Down
2 changes: 1 addition & 1 deletion src/py2dmat/algorithm/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _run(self) -> None:
if self.mode is None:
raise RuntimeError("mode unset")

restore_rng = not self.mode.endswith("-initrand")
restore_rng = not self.mode.endswith("-resetrand")

if self.mode.startswith("init"):
self._initialize()
Expand Down
2 changes: 1 addition & 1 deletion src/py2dmat/algorithm/pamc.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _run(self) -> None:
if self.mode is None:
raise RuntimeError("mode unset")

restore_rng = not self.mode.endswith("-initrand")
restore_rng = not self.mode.endswith("-resetrand")
if self.mode.startswith("init"):
self._initialize()

Expand Down

0 comments on commit aeedd3f

Please sign in to comment.