Skip to content

Conversation

@ChuckHastings
Copy link
Collaborator

This PR refactors the implementation of Louvain. The old implementation did not really implement Louvain. It computed modularity (almost correctly) but then ignored the modularity computation when computing the clustering at each level of algorithm.

The new implementation is partially serial. The portion of the algorithm that attempts to compute delta modularity for each vertex will operate on the vertices in serial. All other aspects of the algorithm have been parallelized. Serializing this portion of the algorithm allows us to compare results with networkx and other serial implementations to validate that the results are correct.

There is some parallelism in that step. While we operate on the vertices in serial, we do a parallel computation (using only one warp) so that computing the delta modularity will get 1 warp worth of parallelism.

It can definitely be improved with more parallelism, but doing this and guaranteeing convergence is hard, it seemed like getting something correct and faster than serial CPU code would be a good first step.

Closes #509
Closes #668

With correct Louvain scores, this PR also fixes the ECG that was disabled in PR #823 and deletes some code now obsolete that was referenced by the old Louvain implementation.

 1) Code cleanup, a bit more modularization
 2) Fix python bindings to work with new code
 3) Now that Louvain works, debug ECG issues
@ChuckHastings ChuckHastings requested review from a team as code owners May 13, 2020 22:03
@GPUtester
Copy link
Contributor

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

@codecov-io
Copy link

codecov-io commented May 13, 2020

Codecov Report

Merging #870 into branch-0.14 will increase coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.14     #870      +/-   ##
===============================================
+ Coverage        47.66%   47.81%   +0.15%     
===============================================
  Files               44       44              
  Lines             1328     1328              
===============================================
+ Hits               633      635       +2     
+ Misses             695      693       -2     
Impacted Files Coverage Δ
python/cugraph/centrality/katz_centrality.py 100.00% <0.00%> (ø)
python/cugraph/community/ecg.py 100.00% <0.00%> (+50.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3136bf1...6f1e723. Read the comment docs.

@BradReesWork BradReesWork added this to the 0.14 milestone May 20, 2020
@afender afender modified the milestones: 0.14, 0.15 May 26, 2020
@afender afender changed the title [WIP] Fix louvain [REVIEW] Fix louvain May 27, 2020
@afender afender requested review from BradReesWork and afender May 27, 2020 15:43
@BradReesWork BradReesWork modified the milestones: 0.15, 0.14 May 27, 2020
@afender afender merged commit 5e024a4 into rapidsai:branch-0.14 May 27, 2020
@ChuckHastings ChuckHastings deleted the fix_louvain branch February 10, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Louvain : how delta modularity weights are passed to the aggregator? Refactor Louvain

5 participants