Skip to content

v0.3.0

Choose a tag to compare

@psychemistz psychemistz released this 14 May 09:09

Highlights

  • New cuda_native ridge backend — ctypes wrapper around RidgeCuda's compiled CUDA kernel. One cudaLaunchKernel for the full perm sweep (~14× kernel-level vs CuPy at small m). Real sparse path via cusparseSpMM with in-kernel column normalization; C-side srand perm-table builder (~200× faster than the Python loop). End-to-end 5.6× faster than cupy on the GSE100093 fixture while bit-equivalent on β/SE/z/p.
  • Dash web app (secactpy-app, optional [app] extra) — spatial / single-cell / bulk tabs with Visium / CosMx / Xenium upload, activity change, cohort survival.
  • secactpy.visualization (optional [viz] extra) — nine SecAct-specific plotly functions.
  • secactpy.downstream (optional [downstream] extra) — coxph_regression, signaling_pattern(_gene), ccc_scrnaseq, ccc_spatial. Delegates to spatial-gpu when available; standalone lifelines / sklearn-NMF fallbacks otherwise.
  • R stack swapbeibeiru/RidgeR (archived) → data2intelligence/RidgeFast (CPU) + data2intelligence/RidgeCuda (GPU). RidgeFast matches RidgeR to better than 2e-14.

Performance

  • ridge NumPy backend auto-picks Y-row vs T-col permutation by m vs p3.3× speedup on the GSE100093 fixture.
  • ridge CuPy backend: perm-table H2D hoisted out of the loop; per-batch mempool.free_all_blocks() dropped.
  • Streaming inference: pass 2 + pass 3 share a single H5AD read (3 → 2 passes); normalize_chunk and accumulate vectorized; H5AD string decoding via np.char.decode.

Fixed

  • Dockerfile: added libuv1-dev so the R fs package and six transitive CRAN deps build from source.
  • H5ADChunkReader: handles obs.attrs['_index'] index naming (consortium datasets), negative categorical codes, and the "symbol" gene-column fallback.
  • Streaming: row_means @ Y_chunk avoids the CSC→CSR transposition copy.
  • activity_correlation: first-subplot xref fixed (x instead of x1).
  • Dash app: temp-file cleanup after uploaded payload reads.
  • glm: renamed ambiguous Iinfo (E741).

Migration notes

  • rng_method default flipped to explicit 'srand' (behaviorally equivalent to the old None → use_gsl_rng=True → CStdlibRNG chain). use_gsl_rng remains as legacy fallback when rng_method=None is passed explicitly.
  • Reference H5AD files under dataset/output/signature/* are still valid; to fully switch source of truth to RidgeFast, re-run sbatch scripts/regenerate_r_reference.sh against the new image.
  • The R reference fixture under tests/ was regenerated on Biowulf (R 4.5.2, glibc 2.28). All 37 tests pass with SE max diff 9.99e-17.

See CHANGELOG.md for the full list.