Skip to content
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

Improve Checkpointing #69

Merged
merged 7 commits into from
Oct 31, 2024
Merged

Improve Checkpointing #69

merged 7 commits into from
Oct 31, 2024

Conversation

ajfriedman22
Copy link
Collaborator

@ajfriedman22 ajfriedman22 commented Oct 17, 2024

This PR adds a new checkpoint file (default=equil.npy) which is utilized for weight updating REXEE and MT-REXEE simulations to allow for simulations to restart when one or more simulations have equilibrated weights, but not all simulations. Additionally, this PR fixes a minor bug in computing g_vec which only affects MT-REXEE simulations.

  • Enough unit tests to achieve a 95% code coverage.
  • No linting errors.
  • No errors from CircleCI.
  • Update the documentation.

@ajfriedman22 ajfriedman22 requested a review from wehs7661 October 17, 2024 15:10
@wehs7661
Copy link
Owner

Since the patch introduces new features, we will need to update the documentation accordingly (added to the todo list above), including this section and this section. Changes for these places can be made in simulation.rst file (linked here).

@wehs7661
Copy link
Owner

BTW, you can check the changes made in the documentation by running make html in the folder docs and open docs/build/html/index.html in your browser.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.01%. Comparing base (98af948) to head (ba5d975).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   96.00%   96.01%   +0.01%     
==========================================
  Files          11       11              
  Lines        2576     2583       +7     
==========================================
+ Hits         2473     2480       +7     
  Misses        103      103              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -322,16 +332,20 @@ def main():
if (i + 1) % REXEE.n_ckpt == 0:
if len(REXEE.g_vecs) != 0:
# Save g_vec as a function of time if weight combination was used.
np.save('g_vecs.npy', REXEE.g_vecs)
np.save(args.g_vecs, REXEE.g_vecs)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the input argument g_vecs was intended to be for specifying an input file like g_vecs.npy for extending the simulation (same for the rep_trajs), but I do think it makes sense to have them specify the output files to be saved as well. I'll tweak the help message of the argument parser.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm actually I think the current help message is fine.

@wehs7661 wehs7661 merged commit 4ffcb5c into master Oct 31, 2024
4 checks passed
@wehs7661 wehs7661 deleted the ckpt-restart branch October 31, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restart from checkpoint fails when some weights have been equilibrated, but not all
2 participants