Skip to content

Restore signal monitoring in long-running accelerator operations#1050

Merged
mdekstrand merged 3 commits intolenskit:mainfrom
mdekstrand:feature/1048-check-signals
Mar 21, 2026
Merged

Restore signal monitoring in long-running accelerator operations#1050
mdekstrand merged 3 commits intolenskit:mainfrom
mdekstrand:feature/1048-check-signals

Conversation

@mdekstrand
Copy link
Member

This updates progress in long-running accelerator operations to also check for Python signals again.

  • Add process_iter (and a variant with an explicit counter) to process an iterator in a worker thread, using rayon-cancel to cancel operation.
  • Monitor for cancellation signals in main thread, since that is where they are raised per the Python documentation.
  • Remove monitor thread logic from progress, since it is no longer needed
  • Update accelerator code to work with new progress design

Closes #1048.

@mdekstrand mdekstrand added this to the 2026.1 milestone Mar 20, 2026
@mdekstrand mdekstrand self-assigned this Mar 20, 2026
@mdekstrand mdekstrand added the internals Internal infrastructure (parallelism, math, etc.) label Mar 20, 2026
@codecov
Copy link

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 89.34911% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.67%. Comparing base (a5029e9) to head (7c36a1d).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/accel/progress.rs 86.66% 10 Missing ⚠️
src/accel/sparse/consumer.rs 33.33% 6 Missing ⚠️
src/accel/als/explicit.rs 92.30% 1 Missing ⚠️
src/accel/als/implicit.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1050      +/-   ##
==========================================
- Coverage   89.78%   89.67%   -0.12%     
==========================================
  Files         223      223              
  Lines       15497    15476      -21     
==========================================
- Hits        13914    13878      -36     
- Misses       1583     1598      +15     

☔ 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.

@mdekstrand mdekstrand merged commit 2b50f02 into lenskit:main Mar 21, 2026
40 of 41 checks passed
@mdekstrand mdekstrand deleted the feature/1048-check-signals branch March 21, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internals Internal infrastructure (parallelism, math, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-implement checking for signals in accelerator

1 participant