Skip to content

save_state takes a compression option for appendable files - #97

Open
ConnorStoneAstro wants to merge 1 commit into
mainfrom
save-state-compression
Open

ConnorStoneAstro wants to merge 1 commit into
mainfrom
save-state-compression

Conversation

@ConnorStoneAstro

Copy link
Copy Markdown
Owner

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".

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>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a88413f) to head (e636c59).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #97   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         1712      1712           
=========================================
  Hits          1712      1712           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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