Skip to content

feat: use the modern UMAP transform pipeline in ingest - #4492

Open
sylvesterkaczmarek wants to merge 3 commits into
scverse:mainfrom
sylvesterkaczmarek:fix/4481-modern-umap-ingest
Open

sylvesterkaczmarek wants to merge 3 commits into
scverse:mainfrom
sylvesterkaczmarek:fix/4481-modern-umap-ingest

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Nov 6, 2026 •

Copy link
Copy Markdown

Closes #4481.

Use UMAP 0.6's modern transform pipeline in tl.ingest, while retaining compatibility with UMAP 0.5. Pass the reference metric parameters, neighbor count and embedding dimension before UMAP validates its state. Reuse the stored reference embedding without fitting a new UMAP model.

Validation on macOS arm64 / Python 3.13:

  • All 23 ingest tests pass with UMAP 0.6.0rc1 and with 0.5.12.
  • Eight real-transform comparison cases fail on the original implementation. Coverage includes dense/sparse inputs, custom metric parameters, 2D/3D embeddings, large references, PCA/custom representations, labels and unchanged reference coordinates.
  • Related neighbor, PCA and accessor tests: 335 passed, 32 skipped, five expected failures; 48 subtests passed.
  • Ruff lint, formatting and whitespace checks pass. The final review correction only clarifies an existing comment; executable Python AST is unchanged from the tested version.
  • The complete project suite and hosted CI have not been run.

LLM usage

  • LLM or coding agent used: GPT-6 via ChatGPT and Codex CLI v0.166.0 assisted with code, tests, documentation, and review. The Codex model version used for the original implementation was not independently recorded.

  • If one was used, I, a human, have reviewed, understood and tested every changed line.

  • Closes Use new umap 0.6 pipeline in ingest #4481.

  • Tests included.

  • Release notes not necessary because:

A release-note fragment is included.

@read-the-docs-business

read-the-docs-business Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 scanpy | 🛠️ Build #4688895 | 📁 Comparing 570a1e3 against latest (117682e)

  🔍 Preview build  

3 files changed
± release-notes/index.html
± api/generated/scanpy.pp.calculate_qc_metrics.html
± api/generated/scanpy.settings.html

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@sylvesterkaczmarek sylvesterkaczmarek changed the title Use the modern UMAP transform pipeline in ingest feat: use the modern UMAP transform pipeline in ingest Nov 6, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Author

I updated the PR to match the repository checks: a semantic title, the numbered release-note fragment, and a float32-tolerant PCA regression assertion after the minimal-dependency CI caught a 2.3e-5 roundoff difference. The production UMAP code is unchanged. Could a maintainer assign the appropriate milestone (perhaps 1.13.0) or the 'no milestone' label when convenient? The milestone check currently fails because neither is set.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.13%. Comparing base (117682e) to head (570a1e3).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4492      +/-   ##
==========================================
- Coverage   85.13%   85.13%   -0.01%     
==========================================
  Files         138      138              
  Lines       12247    12245       -2     
==========================================
- Hits        10427    10425       -2     
  Misses       1820     1820              
Flag Coverage Δ
hatch-test.low-vers 78.70% <ø> (+0.04%) ⬆️
hatch-test.pre 84.92% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/tools/_ingest.py 84.68% <ø> (-0.14%) ⬇️

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use new umap 0.6 pipeline in ingest

1 participant