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

Refactor parallelism to support PyTorch and only use shared memory #393

Merged
merged 28 commits into from
May 10, 2024

Conversation

mdekstrand
Copy link
Member

@mdekstrand mdekstrand commented May 9, 2024

This reworks LensKit's parallel processing support to use PyTorch's shared memory capabilities instead of custom shm buffers or binpickle, and moves it to a new lenskit.parallel package. Further work on #374. Closes #382.

@mdekstrand mdekstrand added the internals Internal infrastructure (parallelism, math, etc.) label May 9, 2024
@mdekstrand mdekstrand added this to the 2024.1 milestone May 9, 2024
@mdekstrand mdekstrand changed the title Use PyTorch shared memory for parallelism Refactor parallelism to support PyTorch and only use shared memory May 10, 2024
Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 93.20000% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 91.68%. Comparing base (d940076) to head (c4c68ab).

Files Patch % Lines
lenskit/parallel/config.py 91.07% 5 Missing ⚠️
lenskit/parallel/pool.py 93.61% 3 Missing ⚠️
lenskit/parallel/serialize.py 93.61% 3 Missing ⚠️
lenskit/parallel/worker.py 92.10% 3 Missing ⚠️
lenskit/parallel/invoker.py 92.59% 2 Missing ⚠️
lenskit/batch/_recommend.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #393      +/-   ##
==========================================
- Coverage   92.25%   91.68%   -0.57%     
==========================================
  Files          41       43       +2     
  Lines        3162     3031     -131     
==========================================
- Hits         2917     2779     -138     
- Misses        245      252       +7     

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

@mdekstrand mdekstrand merged commit c4c68ab into lenskit:main May 10, 2024
18 of 19 checks passed
@mdekstrand mdekstrand deleted the feature/torch-parallel branch May 10, 2024 23:07
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
Status: Done
Development

Successfully merging this pull request may close these issues.

Use PyTorch multiprocessing for parallel evaluation
1 participant