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

Remove hardcoded Pagerank dtype #1751

Merged
merged 4 commits into from
Aug 9, 2021

Conversation

jnke2016
Copy link
Contributor

@jnke2016 jnke2016 commented Jul 30, 2021

fix hard coded pagerank dtype
closes #1737

@jnke2016 jnke2016 requested a review from a team as a code owner July 30, 2021 22:52
@jnke2016 jnke2016 changed the title remove hardcoded weight dtype remove Pagerank hardcoded weight dtype Jul 30, 2021
@jnke2016 jnke2016 changed the title remove Pagerank hardcoded weight dtype Remove hardcoded weight dtype for Pagerank Jul 30, 2021
@jnke2016 jnke2016 changed the title Remove hardcoded weight dtype for Pagerank Remove hardcoded Pagerank dtype Jul 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2021

Codecov Report

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

❗ Current head b4e2fa0 differs from pull request most recent head 582fa15. Consider uploading reports for the commit 582fa15 to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #1751   +/-   ##
===============================================
  Coverage                ?   59.75%           
===============================================
  Files                   ?       77           
  Lines                   ?     3523           
  Branches                ?        0           
===============================================
  Hits                    ?     2105           
  Misses                  ?     1418           
  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 e1787ce...582fa15. Read the comment docs.

@BradReesWork BradReesWork added 3 - Ready for Review improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 2, 2021
@BradReesWork BradReesWork added this to the 21.10 milestone Aug 2, 2021
@@ -46,7 +46,7 @@ def pagerank(input_graph, alpha=0.85, personalization=None, max_iter=100, tol=1.

df = cudf.DataFrame()
df['vertex'] = cudf.Series(np.arange(num_verts, dtype=np.int32))
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this crash with 64 bit vertex IDs as well? (and see the line 37, too).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I talked to @ChuckHastings and he said some of legacy algorithm only support int32 vertex ID but those will be removed as we migrate to primitive based implementations

Copy link
Contributor

Choose a reason for hiding this comment

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

I see, but isn't this code for PageRank? @ChuckHastings Do we still have legacy implementation for PageRank? AFAIK, we're using the primitive based implementation for both SG & MG PageRank.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If Pagerank is primitive based, can I just do this ?
[src, dst] = graph_primtypes_wrapper.datatype_cast([input_graph.edgelist.edgelist_df['src'], input_graph.edgelist.edgelist_df['dst']], [np.int32, np.int64])

df['vertex'] = cudf.Series(np.arange(num_verts, dtype=src.dtype))

Copy link
Collaborator

Choose a reason for hiding this comment

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

Correct. The legacy pagerank implementation was deleted a while back. @jnke2016, your cast as above should work, I believe.

Copy link
Collaborator

@ChuckHastings ChuckHastings left a comment

Choose a reason for hiding this comment

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

That looks better

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 82eb7c8 into rapidsai:branch-21.10 Aug 9, 2021
@jnke2016 jnke2016 deleted the bug_pagerank branch September 24, 2022 23:08
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.

[BUG] Pagerank errors on float64 weights
6 participants