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

Thining results #7

Merged
merged 22 commits into from
Jun 19, 2024
Merged

Thining results #7

merged 22 commits into from
Jun 19, 2024

Conversation

TannazH
Copy link
Collaborator

@TannazH TannazH commented Apr 30, 2024

Description

Added thinning to help the memory usage for large datasets by reducing output storage size by storing every k-th iteration instead of the full chain.

List any dependencies that are required for this change.

No dependencies.
Fixes # (issue)
Improving memory issue for larger cases.

Type of change

Please delete options that are not relevant.

  • [No ] Bug fix (non-breaking change which fixes an issue)
  • [ Yes] New feature (non-breaking change which adds functionality)
  • [ No] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [Yes] This change requires a documentation update

Jupyter Notebooks

If your changes involve Jupyter notebooks please explicitly state here what the change consists of, e.g. only output
cells have changes or specific input changes. This to make sure we capture these changes correctly in the review process.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration

Updated existing test test_run_mcmc with additional input for thinning. We tested that the right number of sample function is called and the storage dictionary is in the right size.
As part of this we renamed the nburn_iter fixture to mcmc_setting to reflect the use of thinning parameter as well.

Checklist:

  • [ True] My code follows the style guidelines of this project
  • [ True] I have performed a self-review of my code
  • [ True] I have made corresponding changes to the documentation
  • [ True] My changes generate no new warnings
  • [ True] I have added tests that prove my fix is effective or that my feature works
  • [ True] New and existing unit tests pass locally with my changes
  • [ True] Any dependent changes have been merged and published in downstream modules

@TannazH TannazH requested a review from mattj89 April 30, 2024 13:41
Signed-off-by: code_reformat <>
Copy link
Collaborator

@mattj89 mattj89 left a comment

Choose a reason for hiding this comment

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

This looks good, thanks. Sorry for taking a little while to get to the review! Hope you can add/change a couple of things as per the comments, but happy to approve in any case.

tests/test_mcmc.py Show resolved Hide resolved
src/openmcmc/mcmc.py Outdated Show resolved Hide resolved
@mattj89
Copy link
Collaborator

mattj89 commented Jun 3, 2024

Also, you'll need to merge in some small changes from main before merging the pull request. Shouldn't be any conflicts.

TannazH and others added 4 commits June 18, 2024 17:18
Signed-off-by: code_reformat <>
Signed-off-by: t.hajimohammadloo <[email protected]>
TannazH and others added 8 commits June 19, 2024 09:51
Signed-off-by: code_reformat <>
Signed-off-by: david.randell <[email protected]>
Signed-off-by: bvandekerkhof <[email protected]>
Signed-off-by: david.randell <[email protected]>
Signed-off-by: t.hajimohammadloo <[email protected]>
Signed-off-by: david.randell <[email protected]>
Signed-off-by: t.hajimohammadloo <[email protected]>
Signed-off-by: david.randell <[email protected]>
Signed-off-by: code_reformat <>
Signed-off-by: t.hajimohammadloo <[email protected]>
Signed-off-by: david.randell <[email protected]>
@mattj89 mattj89 merged commit 523a5f4 into main Jun 19, 2024
8 of 9 checks passed
@mattj89 mattj89 deleted the thining_results branch June 19, 2024 10:00
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.

4 participants