Repository navigation
netcdf export: Add optional support for compressing the snapshot #8781
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
Merged
Jens Hedegaard Nielsen (jenshnielsen)
merged 15 commits into
microsoft:main
from
jenshnielsen:jenshnielsen/agents/optimize-snapshot-storage-overhead
Nov 25, 2026
+893
−39
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
89341bc
Optionally store the netcdf snapshot in a compressed group
jenshnielsen 07f023c
Rename newsfragment to match PR number
jenshnielsen ac6ffb0
Adapt the snapshot group to compression being opt-in
jenshnielsen 2caf4fc
Avoid dangling snapshot pointers in netcdf exports
jenshnielsen 2c54c66
Fix advice for re-exporting a dataset with a snapshot pointer
jenshnielsen e8f56e9
Reduce snapshot overhead in chunked export and cache loading
jenshnielsen 877f2cc
Document the netcdf snapshot group layout
jenshnielsen f1e74bc
Handle missing netcdf snapshot groups
jenshnielsen c233727
Rename export_snapshot_in_group to export_netcdf_snapshot_in_group
jenshnielsen c8e14d9
Stage grouped snapshot exports before replacing the destination
jenshnielsen 974c355
Preserve symlinks and permissions when replacing grouped exports
jenshnielsen f5ce638
Always stage grouped netcdf exports and expand the user directory
jenshnielsen dcedc21
Do not clobber concurrently created exports and expand ~ when loading
jenshnielsen eb6da7b
Keep staged exports owner-only until committed
jenshnielsen d16b62f
Never widen permissions of staged or replaced export files
jenshnielsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Added the config option ``qcodes.config.dataset.export_netcdf_snapshot_in_group``. When enabled, the snapshot of datasets | ||
| exported to NetCDF is stored as a variable in the ``qcodes_metadata`` group, compressed with the same | ||
| ``qcodes.config.dataset.export_netcdf_compression_level`` as the data, rather than as the | ||
| ``snapshot`` attribute. The snapshot is then only read when needed, which reduces the time it takes to open | ||
| files with large snapshots, and their size when compression is enabled. | ||
| The ``snapshot`` attribute then contains a pointer to that location. ``load_from_netcdf`` supports both layouts, and | ||
| the new function ``qcodes.dataset.snapshot_from_netcdf`` can be used to read the snapshot from either layout | ||
| without a QCoDeS database. The option is disabled by default since tools that read the ``snapshot`` attribute directly | ||
| must be updated to support the new layout. |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.