- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 31
 
WIP: Refactor Parallel Graph Algorithms to Use a Centralized Parallel Configuration with Flexible Iterators #86
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
base: main
Are you sure you want to change the base?
Conversation
…ents, demo on betweenness centrality algorithm only
Co-authored-by: Aditi Juneja <91629733+Schefflera-Arboricola@users.noreply.github.com>
Co-authored-by: Aditi Juneja <91629733+Schefflera-Arboricola@users.noreply.github.com>
…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_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