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

Update C++ SG and MG Louvain tests to support Rmat and benchmark tests #2054

Merged

Conversation

ChuckHastings
Copy link
Collaborator

Some general cleanup of C++ Louvain tests.

  • Updated to use the latest structure/override features
  • Added Rmat tests for the MG tests

@ChuckHastings ChuckHastings requested a review from a team as a code owner February 1, 2022 21:52
@ChuckHastings ChuckHastings self-assigned this Feb 1, 2022
@ChuckHastings ChuckHastings added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 1, 2022
@ChuckHastings ChuckHastings added this to the 22.04 milestone Feb 1, 2022
@ChuckHastings ChuckHastings changed the title Update SG and MG Louvain tests to support Rmat and benchmark tests Update C++ SG and MG Louvain tests to support Rmat and benchmark tests Feb 1, 2022
Copy link
Contributor

@seunghwak seunghwak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@@ -29,7 +29,8 @@
#include <vector>

struct Louvain_Usecase {
bool test_weighted_{false};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, are we always testing for weighted graphs only?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Louvain requires a weighted graph. All of the computations operate on the edge weights.

I'll add a CUGRAPH_EXPECTS in the algorithm implementation to check this, since we don't currently check that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we implicitly assume edge weights of 1 if the input graph is unweighted? Or no real use case for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume finding communities in unweighted graphs to be something practical.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python layer will add a weight of 1 for edges if the input graph is unweighted.

I think it would make the C++ code unwieldy to allow the input graph to be unweighted. Once we coarsen the graph it must be weighted, so we'd end up having to have different code paths for the original graph than from the coarsened graphs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, just wanted to point out that there is memory requirement vs implementation complexity trade-off.

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2022

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.04@2b95059). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-22.04    #2054   +/-   ##
===============================================
  Coverage                ?   73.08%           
===============================================
  Files                   ?      151           
  Lines                   ?     9827           
  Branches                ?        0           
===============================================
  Hits                    ?     7182           
  Misses                  ?     2645           
  Partials                ?        0           

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 2b95059...99f0f33. Read the comment docs.

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 0e99668 into rapidsai:branch-22.04 Feb 2, 2022
@ChuckHastings ChuckHastings deleted the fea_louvain_mg_tests branch June 6, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants