Skip to content
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

Use a naive sparse histogram. #446

Merged
merged 4 commits into from
Jan 6, 2025
Merged

Use a naive sparse histogram. #446

merged 4 commits into from
Jan 6, 2025

Conversation

delucchi-cmu
Copy link
Contributor

We really just need the non-zero indexes and non-zero values, and the complexity of the general scipy sparse array is adding a lot of compute overhead. This simplifies the API.

This is a breaking change for LSDB and hats-import, and PRs are coming with fixes for those repos.

Copy link

github-actions bot commented Dec 20, 2024

Before [e07916b] After [41c274d] Ratio Benchmark (Parameter)
75.3±0.3ms 76.1±0.8ms 1.01 benchmarks.MetadataSuite.time_load_partition_join_info
361±3ms 364±2ms 1.01 benchmarks.Suite.time_outer_pixel_alignment
19.1±0.2ms 19.2±0.3ms 1 benchmarks.MetadataSuite.time_load_partition_info_order6
13.4±0.4ms 13.4±0.3ms 1 benchmarks.Suite.time_inner_pixel_alignment
113±0.3ms 113±0.4ms 1 benchmarks.time_test_alignment_even_sky
1.02±0.02ms 1.02±0.01ms 1 benchmarks.time_test_cone_filter_multiple_order
76.1±0.3ms 75.6±0.4ms 0.99 benchmarks.MetadataSuite.time_load_partition_info_order7
41.4±0.6ms 41.0±0.7ms 0.99 benchmarks.Suite.time_pixel_tree_creation

Click here to view all benchmarks.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.14%. Comparing base (e07916b) to head (6876408).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/hats/pixel_math/sparse_histogram.py 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #446      +/-   ##
==========================================
- Coverage   93.24%   93.14%   -0.10%     
==========================================
  Files          47       47              
  Lines        2012     2014       +2     
==========================================
  Hits         1876     1876              
- Misses        136      138       +2     

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

Copy link
Contributor

@camposandro camposandro left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! Added just a minor comment.

src/hats/pixel_math/sparse_histogram.py Outdated Show resolved Hide resolved
@delucchi-cmu delucchi-cmu merged commit c01018f into main Jan 6, 2025
9 checks passed
@delucchi-cmu delucchi-cmu deleted the issue/import/453 branch January 6, 2025 15:40
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