Repository navigation
Conversation
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #988 +/- ##
===========================================
+ Coverage 92.13% 92.94% +0.80%
===========================================
Files 74 84 +10
Lines 5799 6818 +1019
===========================================
+ Hits 5343 6337 +994
- Misses 456 481 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Saved
SamplingResultdata now includes the retained sampling chains.Result.save_datawrites them for JSON, MATLAB, and pickle formats.Result.load_datarestores them as aSamplingResult, withchainsandall_samplespopulated. Before this change the chains were not saved, so a loaded sampling result had no chain data.This supersedes #987, which was closed earlier.
Fixes #898
Design notes
x_model. This PR stores the chains and their shape explicitly. Evaluation logs do not record accepted chain states or discarded warm-up iterations, so rebuilding them would not be exact.Result.load_datakeeps its public behaviour and return type. The loading code is split into the internal helpers_load_data_dictand_from_data_dict.ValueErrorrather than guessing the chains.Type of change
Testing
tests/unit/test_sampling.pyandtests/unit/test_save_data.py: 93 passed.tests/unit/test_optimisation.py -k "save or load or Result": 5 passed.tests/unit): 311 passed, 6 skipped, 0 failed.ruff checkandruff format --checkon the changed files: clean.nox -s pre-commit(ranruffdirectly) andnox -s doctest.Changelog entry added under Features.
🤖 Generated with Claude Code