Skip to content

feat: allow gpu io in sparse_dataset by removing scipy inheritance - #1927

Merged
ilan-gold merged 46 commits into
mainfrom
ig/remove_sparse_inheritance
Jan 27, 2026
Merged

ilan-gold merged 46 commits into
mainfrom
ig/remove_sparse_inheritance

Conversation

@ilan-gold

@ilan-gold ilan-gold commented Mar 20, 2025 •

Copy link
Copy Markdown
Contributor

Aside from the removed ability to write, all functionality should be ported over.

@ilan-gold
ilan-gold marked this pull request as draft March 20, 2025 21:49
@ilan-gold
ilan-gold force-pushed the ig/remove_sparse_inheritance branch from a12700b to eac05cf Compare March 21, 2025 14:23
@codecov

codecov Bot commented Mar 21, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.50000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.56%. Comparing base (ec5dd99) to head (b23a275).
⚠️ Report is 53 commits behind head on main.

Files with missing lines Patch % Lines
src/anndata/_core/sparse_dataset.py 93.46% 10 Missing ⚠️
src/anndata/_core/index.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1927      +/-   ##
==========================================
- Coverage   86.67%   84.56%   -2.12%     
==========================================
  Files          46       46              
  Lines        7226     7203      -23     
==========================================
- Hits         6263     6091     -172     
- Misses        963     1112     +149     
Files with missing lines Coverage Δ
src/anndata/_core/anndata.py 83.35% <100.00%> (+0.16%) ⬆️
src/anndata/compat/__init__.py 85.32% <100.00%> (-1.75%) ⬇️
src/anndata/_core/index.py 92.64% <33.33%> (-0.92%) ⬇️
src/anndata/_core/sparse_dataset.py 90.28% <93.46%> (-2.52%) ⬇️

... and 8 files with indirect coverage changes

@ilan-gold ilan-gold mentioned this pull request Aug 22, 2025
5 of 6 tasks
@ilan-gold ilan-gold changed the title feat: remove sparse data scipy inheritance feat: allow gpu io in sparse_dataset by removing scipy inheritance Jan 20, 2026
@ilan-gold
ilan-gold marked this pull request as ready for review January 20, 2026 17:03

@flying-sheep flying-sheep left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great stuff, nice simplifications with the major/minor axis stuff. Some questions

Comment thread src/anndata/_core/anndata.py Resolved
Comment thread tests/test_backed_hdf5.py Resolved
Comment thread src/anndata/_core/sparse_dataset.py Resolved
Comment thread src/anndata/_core/sparse_dataset.py Outdated

@property
def memory_format(self) -> type[SparseMatrixType]:
is_gpu = hasattr(zarr, "config") and "gpu" in zarr.config.get("ndbuffer")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe unify this with get_np_module? It’s the same logic.

Also this can just be one expression by setting getattr’s 3rd argument (the default) to {}.

Comment thread src/anndata/_core/sparse_dataset.py Resolved
Comment thread src/anndata/_core/sparse_dataset.py Resolved
Comment thread src/anndata/_core/sparse_dataset.py Resolved
@ilan-gold
ilan-gold enabled auto-merge (squash) January 27, 2026 12:47
@ilan-gold
ilan-gold merged commit 2a2c0e3 into main Jan 27, 2026
21 of 22 checks passed
@ilan-gold
ilan-gold deleted the ig/remove_sparse_inheritance branch January 27, 2026 12:58
@ilan-gold ilan-gold modified the milestones: 0.13.0, 0.14.0 Jul 8, 2026
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.

Refactor BaseCompressedSparseDataset and subclasses to remove backed_{csr,csc}_matrix

2 participants