-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
WIP: Refactor Parallel Graph Algorithms to Use a Centralized Parallel Configuration with Flexible Iterators #86
base: main
Are you sure you want to change the base?
Conversation
…ents, demo on betweenness centrality algorithm only
Co-authored-by: Aditi Juneja <[email protected]>
Co-authored-by: Aditi Juneja <[email protected]>
…ion from ParallelConfig
…ion from ParallelConfig
These changes to the centralized processing of chunks seem good. I like the general So +1 on the the interface from me, though I'd like to hear from @Schefflera-Arboricola too. :) Thanks for this! |
8d3e8e0
to
5c3be70
Compare
…llelGraph interface, instead making execute_parallel more dynamic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
Sorry for the delay in review.
No problem! Looks like we still need @Schefflera-Arboricola to also approve before this can get merged. |
Summary:
This PR introduces a new
execute_parallel
function that simplifies algorithm parallelization logic by obviating the need for separate joblib calls for each algorithm while enabling much greater flexibility (for developers and the user).Key Updates:
Add
execute_parallel
:iterator_func
to customize how data (nodes, edges, etc.) is iterated over.get_chunks
.Remove
create_iterables
:iterator_func
withinexecute_parallel
.Thread-safe Joblib config:
parallel_config
context manager that uses thread-local storage to manage Joblib settings (like backend/verbose) without interference during concurrent runs.Refactor
betweenness_centrality
&edge_betweenness_centrality
to useexecute_parallel
as a POC.Why This Matters:
execute_parallel
anditerator_func
make this adaptable for any graph algs that need parallelism.create_iterables
.TODO:
Add unit test forexecute_parallel
once the interface gets the green-lightPerform regression test to ensure equivalent functionalityexecute_parallel
in place of existing separate joblib calls