Skip to content

Use Rust to accelerate negative sampling - #723

Merged
mdekstrand merged 18 commits into
lenskit:mainfrom
mdekstrand:feature/accel-negatives
Apr 18, 2025
Merged

Use Rust to accelerate negative sampling#723
mdekstrand merged 18 commits into
lenskit:mainfrom
mdekstrand:feature/accel-negatives

Conversation

@mdekstrand

Copy link
Copy Markdown
Member

This pushes the negative sampling verification logic into Rust to dramatically speed up sampling, especially for multiple items.

This also introduces a RowColumnSet data structure for fast negative verification.

Closes #720.

@mdekstrand mdekstrand added this to the 2025.3 milestone Apr 18, 2025
@codecov

codecov Bot commented Apr 18, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 91.03448% with 13 lines in your changes missing coverage. Please review.

Project coverage is 90.45%. Comparing base (12934c9) to head (6c5d58f).
Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
src/lenskit/data/matrix.py 87.77% 11 Missing ⚠️
src/lenskit/data/relationships.py 96.36% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #723      +/-   ##
==========================================
- Coverage   90.45%   90.45%   -0.01%     
==========================================
  Files         137      137              
  Lines        9643     9713      +70     
==========================================
+ Hits         8723     8786      +63     
- Misses        920      927       +7     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mdekstrand
mdekstrand merged commit 13459ab into lenskit:main Apr 18, 2025
@mdekstrand
mdekstrand deleted the feature/accel-negatives branch April 18, 2025 22:57
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.

Accelerate negative sampling

1 participant