Repository navigation
save_state takes a compression option for appendable files - #97
Open
ConnorStoneAstro wants to merge 1 commit into
Open
ConnorStoneAstro wants to merge 1 commit into
ConnorStoneAstro wants to merge 1 commit into
Conversation
Appendable value datasets were always gzip compressed. A sampler that appends a state every few steps pays the filter on every append, and float samples compress poorly, so save_state(..., compression=None) now writes them uncompressed. The default stays "gzip". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The configurable state-file compression change has no active review issues.
No open issues 🎉
What changed in this PR
Adds configurable compression for appendable HDF5 state files, allowing frequent saves to avoid compression overhead while preserving "gzip" as the default.
Changes:
- Adds and documents the
save_state(..., compression=...)option. - Passes the option through child nodes to appendable parameter value datasets.
- Adds coverage for uncompressed appends, default gzip compression, and loading saved values.
| File | Description |
|---|---|
tests/test_save.py |
Tests uncompressed save, append, and load behavior plus the gzip default. |
src/caskade/param.py |
Applies the selected compression to appendable value datasets. |
src/caskade/base.py |
Exposes, documents, and forwards the compression option. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 1712 1712
=========================================
Hits 1712 1712
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Appendable value datasets were always gzip compressed. A sampler that appends a state every few steps pays the filter on every append, and float samples compress poorly, so save_state(..., compression=None) now writes them uncompressed. The default stays "gzip".