feat(concat_on_disk): support pairwise=True - #2636
Open
alejandro-publius wants to merge 3 commits into
Open
alejandro-publius wants to merge 3 commits into
alejandro-publius wants to merge 3 commits into
Conversation
This was referenced Sep 6, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2636 +/- ##
==========================================
- Coverage 87.64% 85.87% -1.77%
==========================================
Files 49 49
Lines 8125 8151 +26
==========================================
- Hits 7121 7000 -121
- Misses 1004 1151 +147
|
Closes scverse#2414. `concat_on_disk` raised `NotImplementedError` for `pairwise=True` and never wrote the concatenation-axis pairwise group at all. It now writes `.{obs,var}p` as the block diagonal of each object's pairwise elements, matching `concat_pairwise_mapping` used by the in-memory `concat`: keys are intersected or unioned according to `join`, and an object lacking a key contributes an empty block. The block diagonal is built one object at a time rather than assembled whole: row block `i` is that object's `(n_i, n_i)` element padded with zeros to `(n_i, N)` and appended to the output dataset, so only a single object's pairwise element is resident at a time. The result's dtype is resolved across all objects before the first block is written, since that write fixes the dtype of the dataset the remaining blocks are appended to -- otherwise a leading empty stand-in block would pin the output to `bool`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KAdFWr2Fo9HAtSiSWF4KPU
towncrier fragments are keyed by PR number and use the `feat` type. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KAdFWr2Fo9HAtSiSWF4KPU
…test `_adatas_to_paths` was replaced by `_adatas_to_stores` plus `_make_store`, so the default-off test raised NameError. It now builds stores the way the other tests in this module do. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
alejandro-publius
force-pushed
the
feat/concat-on-disk-pairwise
branch
from
September 16, 2026 01:23
562cea6 to
68ef855
Compare
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.
pairwiseforconcat_on_disk#2414concat_on_diskraisedNotImplementedErrorforpairwise=Trueand never wrote the concatenation-axis pairwise group. It now writes.{obs,var}pas the block diagonal of each object's pairwise elements, matchingconcat_pairwise_mappingused by the in-memoryconcat: keys are intersected or unioned according tojoin, and an object lacking a key contributes an empty block.The block diagonal is streamed one object at a time rather than assembled whole: row block
iis that object's(n_i, n_i)element padded with zeros to(n_i, N)and appended to the output dataset, so only a single object's pairwise element is resident at once. The result dtype is resolved across all objects before the first block is written, since that write fixes the dtype of the dataset the remaining blocks are appended to; otherwise a leading empty stand-in block would pin the output tobool.Tests check the result against
concatfor both file formats and both joins, cover objects that lack a key, and confirm.obspis left out unlesspairwise=Trueis passed.This touches the same file as #2558 but is independent of it; whichever lands second will need a trivial rebase.