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

Change Save/Resume backend to JLD2 #152

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Change Save/Resume backend to JLD2 #152

wants to merge 7 commits into from

Conversation

zeyus
Copy link
Collaborator

@zeyus zeyus commented Oct 15, 2024

JLD2 might deal better with objects, although it will not save the model function correctly (it's just a ref) but hopefully, when resuming sampling this isn't an issue anyway because it should not reuse any of that if we send in the sampler, model func, etc to the sample call.

Fixes #151

This removes dependencies for HDF5 and MCMCChainsStorage, and adds JLD2. The save/resume functionality now just saves the entire chain with JLD2.save_object ... this might need some further tweaking / testing as it throws a warning.

A test has been added to continue sampling from a saved chain, which seems to work, but I can't guarantee it really "resets" the state (in fact I'm pretty sure it doesn't) so I'm not sure how to make the test more realistic (maybe create a new model that's exactly the same, a new sampler instance, etc?)

@zeyus zeyus linked an issue Oct 15, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 73.95%. Comparing base (b2f197d) to head (b177c94).

Files with missing lines Patch % Lines
src/fitting/fit_model.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #152      +/-   ##
==========================================
+ Coverage   73.87%   73.95%   +0.07%     
==========================================
  Files          32       32              
  Lines         930      929       -1     
==========================================
  Hits          687      687              
+ Misses        243      242       -1     

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

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.

chain resume func
2 participants