Skip to content

Add a scipy.sparse numba extension #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Apr 10, 2025
Merged

Add a scipy.sparse numba extension #73

merged 30 commits into from
Apr 10, 2025

Conversation

flying-sheep
Copy link
Member

@flying-sheep flying-sheep commented Apr 3, 2025

OK, I now made the benchmarks bigger. This way only some is_constant tests for sparse matrices are still <1ms (and therefore show up in the regressions). (This is because when reducing along the major axis, many rows/cols without entries can be skipped)

Copy link

codspeed-hq bot commented Apr 3, 2025

CodSpeed Performance Report

Merging #73 will degrade performances by 37.09%

Comparing pa/nbext (59b9fc3) with main (104bf1c)

Summary

❌ 4 (👁 4) regressions
✅ 84 untouched benchmarks
🆕 36 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 test_stats_benchmark[0-numpy.ndarray-int32-is_constant] N/A 3.7 ms N/A
🆕 test_stats_benchmark[0-numpy.ndarray-int32-mean] N/A 4.7 ms N/A
🆕 test_stats_benchmark[0-numpy.ndarray-int32-mean_var] N/A 9.5 ms N/A
🆕 test_stats_benchmark[0-numpy.ndarray-int32-sum] N/A 4.7 ms N/A
👁 test_stats_benchmark[0-scipy.sparse.csc_array-float32-is_constant] 482.4 µs 747.2 µs -35.43%
👁 test_stats_benchmark[0-scipy.sparse.csc_array-float64-is_constant] 479.6 µs 743.2 µs -35.47%
🆕 test_stats_benchmark[0-scipy.sparse.csc_array-int32-is_constant] N/A 746 µs N/A
🆕 test_stats_benchmark[0-scipy.sparse.csc_array-int32-mean] N/A 11.8 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csc_array-int32-mean_var] N/A 6.7 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csc_array-int32-sum] N/A 11.7 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csr_array-int32-is_constant] N/A 22.9 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csr_array-int32-mean] N/A 16.7 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csr_array-int32-mean_var] N/A 19.6 ms N/A
🆕 test_stats_benchmark[0-scipy.sparse.csr_array-int32-sum] N/A 16.6 ms N/A
🆕 test_stats_benchmark[1-numpy.ndarray-int32-is_constant] N/A 3.8 ms N/A
🆕 test_stats_benchmark[1-numpy.ndarray-int32-mean] N/A 4.2 ms N/A
🆕 test_stats_benchmark[1-numpy.ndarray-int32-mean_var] N/A 9.2 ms N/A
🆕 test_stats_benchmark[1-numpy.ndarray-int32-sum] N/A 4.1 ms N/A
🆕 test_stats_benchmark[1-scipy.sparse.csc_array-int32-is_constant] N/A 22.9 ms N/A
🆕 test_stats_benchmark[1-scipy.sparse.csc_array-int32-mean] N/A 16.6 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Copy link

codecov bot commented Apr 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.91%. Comparing base (104bf1c) to head (59b9fc3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
+ Coverage   98.49%   98.91%   +0.42%     
==========================================
  Files          15       17       +2     
  Lines         265      370     +105     
==========================================
+ Hits          261      366     +105     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@flying-sheep flying-sheep marked this pull request as ready for review April 7, 2025 14:23
@flying-sheep flying-sheep added the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@github-actions github-actions bot removed the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@flying-sheep flying-sheep added the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@github-actions github-actions bot removed the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@flying-sheep flying-sheep added the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@github-actions github-actions bot removed the run-gpu-ci Apply this label to run GPU CI once label Apr 7, 2025
@flying-sheep flying-sheep requested a review from ilan-gold April 7, 2025 15:30
@flying-sheep flying-sheep changed the title numba extension Add a scipy.sparse numba extension Apr 7, 2025
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: MPL-2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder if some of these pyi files could be contributed back to the packages for which they are made

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m certainly planning to do that!

@flying-sheep flying-sheep added the run-gpu-ci Apply this label to run GPU CI once label Apr 8, 2025
@flying-sheep flying-sheep requested a review from ilan-gold April 8, 2025 15:41
@github-actions github-actions bot removed the run-gpu-ci Apply this label to run GPU CI once label Apr 8, 2025
@flying-sheep flying-sheep added the run-gpu-ci Apply this label to run GPU CI once label Apr 8, 2025
@github-actions github-actions bot removed the run-gpu-ci Apply this label to run GPU CI once label Apr 8, 2025
@flying-sheep flying-sheep merged commit ebc890f into main Apr 10, 2025
16 of 17 checks passed
@flying-sheep flying-sheep deleted the pa/nbext branch April 10, 2025 07:48
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.

2 participants