Repository navigation
Closed
Labels
bugSomething isn't working
Description
Part of #87.
wave 3 · 0.17.6 · size M · starts after: B1 (#89) (both edit commands/recast.py)
Goal. The perf suite can see memory that --chunk does not bound, and recast stays within it.
Owns: tests/perf_counters.py, tests/test_performance.py, core/recast.py, commands/recast.py
Approach:
- Do this first. Extend
perf_countersto count decoded bytes and peak RSS (in a subprocess). Add wide-matrix and anndata-0.13 sharded Zarr v3 fixtures, and grow n_var as well as n_obs (F091, F146). This harness is what B6b is measured with. - Bounding memory:
check_caststreams blocks (F029);- CSC densify and sparsify use column blocks sized by
--chunk(F030); - the transpose's pass 2 steps by bytes, not average nnz (F077);
- densify uses
--chunkrows, not the source chunk height (F078).
- Correctness:
- the index-dtype overflow check always runs, and
--forcedoes not skip it (F013); - float16 sparse output that anndata cannot read is refused (F058);
- explicit zeros are dropped after a lossy cast (F121);
- nested matrix paths are converted, not copied (F043).
- the index-dtype overflow check always runs, and
Findings
| Ref | Sev | Finding | Where |
|---|---|---|---|
| F013 | H | --force silently disables the index-dtype overflow check, and dense-to-sparse never runs it, so indptr can wrap | src/adata/core/recast.py:752 |
| F029 | H | recast --dtype on a dense matrix loads the whole matrix (plus cast copies) in check_cast, whatever --chunk is |
src/adata/core/recast.py:138 |
| F030 | H | densify and sparsify of CSC allocate n_rows x --chunk per block, so memory scales with n_obs | src/adata/core/recast.py:559 |
| F043 | M | recast of a two-level nested matrix path reports success but copies the matrix unconverted | src/adata/commands/recast.py:167 |
| F058 | M | recast --dtype float16 on a sparse matrix exits 0 ('every value round-trips') but writes a store anndata/scipy cannot read | src/adata/core/recast.py:61 |
| F077 | M | Streaming transpose steps pass 2 by the average nnz per major, so skewed matrices read many times --chunk at once | src/adata/core/recast.py:490 |
| F078 | M | Densifying to CSR/CSC (recast --layout, 10x-h5 export) uses the dense source's chunk row height as the element chunk of data/indices: down … | src/adata/core/recast.py:612 |
| F091 | M | The peak-memory guard uses only an 8-column CSR fixture and grows only n_obs, so it cannot see the paths --chunk does not bound | tests/test_performance.py:1634 |
| F121 | L | Lossy --force cast to a sparse layout from dense keeps entries that became zero | src/adata/core/recast.py:625 |
| F146 | L | The complexity guards count elements and store calls, never decoded bytes, RSS or descriptors, and use only default-chunked fixtures, so … | tests/perf_counters.py:60 |
Done when one PR on fix/b6a closes this, with a regression test against an oracle for every finding, and docs and changelog in the same PR.
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity