Skip to content

Simplify scale - #3351

Merged
flying-sheep merged 33 commits into
mainfrom
simplify-scale
May 16, 2025
Merged

Simplify scale#3351
flying-sheep merged 33 commits into
mainfrom
simplify-scale

Conversation

@flying-sheep

@flying-sheep flying-sheep commented Nov 11, 2024

Copy link
Copy Markdown
Member

scale_sparse has a lot of code that’s not needed.

This PR also fixes zappy compatibility for scale, not that anyone is using it as far as I know.

@codecov

codecov Bot commented Nov 11, 2024

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.68%. Comparing base (c2a7a4b) to head (a5caa39).
⚠️ Report is 46 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/scanpy/tools/_louvain.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3351      +/-   ##
==========================================
- Coverage   76.68%   76.68%   -0.01%     
==========================================
  Files         113      113              
  Lines       12735    12709      -26     
==========================================
- Hits         9766     9746      -20     
+ Misses       2969     2963       -6     
Files with missing lines Coverage Δ
src/scanpy/_utils/__init__.py 75.50% <100.00%> (+0.22%) ⬆️
src/scanpy/preprocessing/_deprecated/__init__.py 90.47% <100.00%> (+9.70%) ⬆️
src/scanpy/preprocessing/_normalization.py 80.21% <100.00%> (-0.84%) ⬇️
src/scanpy/preprocessing/_scale.py 89.47% <100.00%> (-0.88%) ⬇️
src/scanpy/tools/_louvain.py 62.50% <50.00%> (+1.27%) ⬆️

@scverse-benchmark

scverse-benchmark Bot commented Nov 11, 2024

Copy link
Copy Markdown

Benchmark changes

Change Before [c2a7a4b] After [a5caa39] Ratio Benchmark (Parameter)
- 45.2±1ms 36.5±0.4ms 0.81 preprocessing_counts.FastSuite.time_calculate_qc_metrics('pbmc3k', 'counts')
- 8.83±1ms 6.89±0.2ms 0.78 preprocessing_counts.FastSuite.time_log1p('pbmc3k', 'counts')
+ 890M 1.28G 1.44 preprocessing_log.peakmem_scale('pbmc3k', 'off-axis')
+ 1.08G 1.51G 1.39 preprocessing_log.peakmem_scale('pbmc3k', None)
- 731±1ms 492±1ms 0.67 preprocessing_log.time_scale('pbmc3k', 'off-axis')
- 714±10ms 556±0.8ms 0.78 preprocessing_log.time_scale('pbmc3k', None)

Comparison: https://github.com/scverse/scanpy/compare/c2a7a4b7ec3203121a8d75aa05fbeb602ceecbd4..a5caa39435fa9b5c1c88cea9cce904ca813757d7
Last changed: Thu, 15 May 2025 17:20:16 +0000

More details: https://github.com/scverse/scanpy/pull/3351/checks?check_run_id=42303504284

@flying-sheep flying-sheep changed the title Simplify-scale Simplify scale Nov 11, 2024
@flying-sheep flying-sheep modified the milestones: 1.11.0, 1.12.0 Dec 20, 2024
@flying-sheep flying-sheep self-assigned this Feb 17, 2025
@flying-sheep flying-sheep modified the milestones: 1.12.0, 1.11.1 Feb 17, 2025
@flying-sheep
flying-sheep marked this pull request as ready for review February 17, 2025 11:57
@flying-sheep
flying-sheep requested review from Intron7 and removed request for Intron7 February 17, 2025 16:31
@flying-sheep
flying-sheep enabled auto-merge (squash) May 15, 2025 16:35
@flying-sheep
flying-sheep disabled auto-merge May 15, 2025 16:37
@flying-sheep
flying-sheep merged commit e6e86f2 into main May 16, 2025
@flying-sheep
flying-sheep deleted the simplify-scale branch May 16, 2025 07:28
@flying-sheep flying-sheep modified the milestones: 1.11.2, 1.12.0 May 16, 2025
@scverse scverse deleted a comment from lumberbot-app Bot May 16, 2025
selmanozleyen pushed a commit that referenced this pull request May 19, 2025
Co-authored-by: Intron7 <severin.dicks@icloud.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ilan-gold added a commit that referenced this pull request May 19, 2025
* update normalize_total & remove dep

* refactor: `normalize_total` with Numba (#3593)

Co-authored-by: Philipp A. <flying-sheep@web.de>

* fix doctest

* add release note

* Switch from profimp to tuna for parsing import profiles (#3620)

* [pre-commit.ci] pre-commit autoupdate (#3622)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philipp A. <flying-sheep@web.de>

* Fix typo (#3555)

Co-authored-by: Phil Schaf <flying-sheep@web.de>

* Switch to fast-array-utils (#3598)

Co-authored-by: Rodrigo Goya <rgoya@users.noreply.github.com>

* tSNE components parameter (#2803)

Co-authored-by: Phil Schaf <flying-sheep@web.de>

* Simplify scale (#3351)

Co-authored-by: Intron7 <severin.dicks@icloud.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* remove layers test

* explicit return and fix the info message

* remove unnecessary ravel's

* precision fix

* (fix): maintain data type properly.

* (fix): remove artifact storage

* (refactor): use nice f-a-u typing

---------

Co-authored-by: Philipp A. <flying-sheep@web.de>
Co-authored-by: Selman Özleyen <32667648+selmanozleyen@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Swastik Mishra <4453983+swstkm@users.noreply.github.com>
Co-authored-by: Rodrigo Goya <rgoya@users.noreply.github.com>
Co-authored-by: Kitsune <48340051+ch1ru@users.noreply.github.com>
Co-authored-by: selmanozleyen <syozleyen@gmail.com>
Co-authored-by: ilan-gold <ilanbassgold@gmail.com>
@ilan-gold ilan-gold modified the milestones: 1.12.0, 1.11.2 May 20, 2025
ilan-gold pushed a commit that referenced this pull request May 20, 2025
ilan-gold added a commit that referenced this pull request May 20, 2025
* Backport PR #3351: Simplify scale

* (fix): try register

* (fix): one more missing register

---------

Co-authored-by: Philipp A <flying-sheep@web.de>
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.

3 participants