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

Count how many times each method is called #292

Merged
merged 7 commits into from
Jan 5, 2024
Merged

Conversation

pabloferz
Copy link
Member

This makes sure that each sampling method has a ncalls field that counts how many times it's update method has been called.

This should make easier implementing tooling for handling workflows with restarts as we can better find out for how long has a method run.

Copy link

trunk-io bot commented Jan 2, 2024

😎 Merged successfully (details).

@pabloferz pabloferz force-pushed the count-method-calls branch 2 times, most recently from b31b66c to fa51a89 Compare January 4, 2024 21:45
Copy link
Collaborator

@gustavor101 gustavor101 left a comment

Choose a reason for hiding this comment

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

Changes work as intended, a wall limit could be included in run method for max number of ncalls.

@trunk-io trunk-io bot merged commit a83669a into main Jan 5, 2024
28 checks passed
@pabloferz pabloferz deleted the count-method-calls branch January 5, 2024 00:21
@pabloferz pabloferz mentioned this pull request Jan 31, 2024
trunk-io bot pushed a commit that referenced this pull request Feb 1, 2024
In #292, we introduced a mechanism to count the number of calls to a method, but mistakenly that PR broke `SpectralABF` and `FUNN`, fixing those here.

In addition this makes the analysis for `SpectralABF` match the rest of the methods (it was giving the free energy surfaces with opposite sign to the rest of the methods).
trunk-io bot pushed a commit that referenced this pull request Feb 28, 2024
This adds two new functions `pysages.save` and `pysages.load` that handle serialize+write to and read+deserialize from a file, respectively.

If a file was pickled before #292, `pysages.load` tries to workaround the fact that previous sampling method classes didn't contain a `ncalls` field.

Closes #298
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.

2 participants