Skip to content

Zb/illico threads#4205

Open
zboldyga wants to merge 6 commits into
scverse:mainfrom
zboldyga:zb/illico-threads
Open

Zb/illico threads#4205
zboldyga wants to merge 6 commits into
scverse:mainfrom
zboldyga:zb/illico-threads

Conversation

@zboldyga

@zboldyga zboldyga commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • Closes #
  • [x ] [Tests][x] included or not required because:

@ilan-gold this is a small PR that does a few things:

  • illico previously wasn't getting a thread value passed down (e.g. n_jobs), it was defaulting to 1. that is fixed
  • there was a preexisting bug with the _numba utility for resolving thread count, it resolved -1 to 1 thread. the only place it was used was in rank_genes_groups, which passed n_jobs, so this conflicted with scanpy docs. This now properly sets to the numba thread count
  • we also wrap the illico call with the _numba utility so numba thread count restores upon completion (I think illico modifies numba thread count, this helps prevent side effects).

zboldyga added 6 commits July 8, 2026 15:09
…on_illico

Pass settings.n_jobs to illico.asymptotic_wilcoxon (was defaulting to 1
thread, ~12x slower than possible). Document the wilcoxon_illico method,
correct the corr_method/tie_correct/logfoldchanges docstrings, and include
non-logreg methods in the finished-log message.
…or. wrap illico call so numba config setting is properly restored on completion (so no side effects on thread value from illico)
@zboldyga

zboldyga commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@ilan-gold while not high impact, I also saw some inconsistencies with the way n_jobs is used throughout scanpy. I preferred not to open that can of worms here. Might just be something that is most easily solved with clear docs in each use case anyway.

@zboldyga zboldyga marked this pull request as ready for review July 9, 2026 01:23
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.88%. Comparing base (eea0015) to head (d2f7004).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4205      +/-   ##
==========================================
- Coverage   79.90%   79.88%   -0.02%     
==========================================
  Files         121      121              
  Lines       12949    12958       +9     
==========================================
+ Hits        10347    10352       +5     
- Misses       2602     2606       +4     
Flag Coverage Δ
hatch-test.low-vers ?
hatch-test.pre 79.88% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
src/scanpy/_utils/_numba.py 100.00% <100.00%> (ø)
src/scanpy/tools/_rank_genes_groups.py 94.16% <100.00%> (ø)

... and 3 files with indirect coverage changes

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.

1 participant