perf: fast path for unchunked minor axis dask sparse reindexing when concating#2395
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2395 +/- ##
==========================================
- Coverage 87.43% 85.47% -1.96%
==========================================
Files 49 49
Lines 7720 7725 +5
==========================================
- Hits 6750 6603 -147
- Misses 970 1122 +152
|
Benchmark changes
Comparison: https://github.com/scverse/anndata/compare/30f20c8588259827926df75b458d541e6b0bb434..ece963b4de3184890ad5f5747e3017cfbb6855e9 More details: https://github.com/scverse/anndata/pull/2395/checks?check_run_id=72116855662 |
dask sparse reindexing when concatingdask sparse reindexing when concating
flying-sheep
approved these changes
Apr 20, 2026
Member
flying-sheep
left a comment
There was a problem hiding this comment.
Looks great! One nitpick, otherwise let’s go!
…into ig/minor_axis_unchunked
dask sparse reindexing when concatingdask sparse reindexing when concating
flying-sheep
pushed a commit
that referenced
this pull request
Apr 21, 2026
…or axis `dask` sparse reindexing when `concat`ing) (#2397) Co-authored-by: Ilan Gold <ilanbassgold@gmail.com>
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.
Someone tried annbatch shuffling-ing the whole cellxgene census which raised this bug where our outer-join, while correct, was effectively a densification operation for CSR matrices. Why? The previous iteration basically did this for every block
which means 0's are actually stored. After fixing this, it took sub-7 hours, which is basically what we'd expect given our benchmark in our paper. The speedup / memory gains are confirmed on the benchmark (see below for results).