Skip to content

fix: anndata.experimental.read_lazy index fixes (checking uniqueness + unnecessary dask loading)#2419

Merged
ilan-gold merged 6 commits intomainfrom
ig/speed_up_index_creation_lazy
May 6, 2026
Merged

fix: anndata.experimental.read_lazy index fixes (checking uniqueness + unnecessary dask loading)#2419
ilan-gold merged 6 commits intomainfrom
ig/speed_up_index_creation_lazy

Conversation

@ilan-gold
Copy link
Copy Markdown
Contributor

Going through dask is unnecessary when the index is being read into memory. And checking for uniqueness should not be globally switched if it is not necessary i.e., if someone is loading their annotation index, it should not be turned on by us.

  • Closes #
  • Tests added
  • Release note not necessary because:

@ilan-gold ilan-gold added this to the 0.12.12 milestone May 6, 2026
@ilan-gold ilan-gold changed the title fix: anndata.experimental.read_lazy fixes fix: anndata.experimental.read_lazy index fixes (checking uniqueness + unnecessary dask loading) May 6, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.49%. Comparing base (70fcdce) to head (2de8c86).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2419      +/-   ##
==========================================
- Coverage   87.44%   85.49%   -1.95%     
==========================================
  Files          49       49              
  Lines        7736     7731       -5     
==========================================
- Hits         6765     6610     -155     
- Misses        971     1121     +150     
Files with missing lines Coverage Δ
src/anndata/_io/specs/lazy_methods.py 96.15% <100.00%> (+0.47%) ⬆️
src/anndata/experimental/backed/_io.py 96.42% <100.00%> (+0.06%) ⬆️

... and 8 files with indirect coverage changes

@ilan-gold ilan-gold enabled auto-merge (squash) May 6, 2026 10:41
@ilan-gold ilan-gold merged commit 79e3aa8 into main May 6, 2026
33 of 38 checks passed
@ilan-gold ilan-gold deleted the ig/speed_up_index_creation_lazy branch May 6, 2026 12:56
@lumberbot-app
Copy link
Copy Markdown

lumberbot-app Bot commented May 6, 2026

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 0.12.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 79e3aa857a8a03b5b60ca941c0aae8b2b7b140d7
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #2419: fix: `anndata.experimental.read_lazy` index fixes (checking uniqueness + unnecessary dask loading)'
  1. Push to a named branch:
git push YOURFORK 0.12.x:auto-backport-of-pr-2419-on-0.12.x
  1. Create a PR against branch 0.12.x, I would have named this PR:

"Backport PR #2419 on branch 0.12.x (fix: anndata.experimental.read_lazy index fixes (checking uniqueness + unnecessary dask loading))"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

ilan-gold added a commit that referenced this pull request May 6, 2026
…(checking uniqueness + unnecessary dask loading) (#2420)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant