WIP: Refactor Parallel Graph Algorithms to Use a Centralized Parallel Configuration with Flexible Iterators#86
Open
dPys wants to merge 19 commits intonetworkx:mainfrom
Open
WIP: Refactor Parallel Graph Algorithms to Use a Centralized Parallel Configuration with Flexible Iterators#86dPys wants to merge 19 commits intonetworkx:mainfrom
dPys wants to merge 19 commits intonetworkx:mainfrom
Conversation
added 4 commits
September 27, 2024 13:07
…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
Member
|
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
dschult
approved these changes
Dec 20, 2024
Member
dschult
left a comment
There was a problem hiding this comment.
This looks good to me!
Sorry for the delay in review.
Contributor
Author
|
No problem! Looks like we still need @Schefflera-Arboricola to also approve before this can get merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This PR introduces a new
execute_parallelfunction 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_functo customize how data (nodes, edges, etc.) is iterated over.get_chunks.Remove
create_iterables:iterator_funcwithinexecute_parallel.Thread-safe Joblib config:
parallel_configcontext manager that uses thread-local storage to manage Joblib settings (like backend/verbose) without interference during concurrent runs.Refactor
betweenness_centrality&edge_betweenness_centralityto useexecute_parallelas a POC.Why This Matters:
execute_parallelanditerator_funcmake this adaptable for any graph algs that need parallelism.create_iterables.TODO:
Add unit test forexecute_parallelonce the interface gets the green-lightPerform regression test to ensure equivalent functionalityexecute_parallelin place of existing separate joblib calls