-
Notifications
You must be signed in to change notification settings - Fork 310
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
Refactor MG neighborhood sampling and add SG implementation #2285
Refactor MG neighborhood sampling and add SG implementation #2285
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.06 #2285 +/- ##
================================================
- Coverage 70.82% 63.03% -7.79%
================================================
Files 170 104 -66
Lines 11036 4805 -6231
================================================
- Hits 7816 3029 -4787
+ Misses 3220 1776 -1444
Continue to review full report at Codecov.
|
…6-fea_neighborhood_sampling
…6-fea_neighborhood_sampling
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.
I tried to create a deprecation warning wrapper, but found the deprecation message you used worked better for my PRs, so I appreciated that addition here. Overall, the PR LGTM, I only had a few minor comments
@@ -19,3 +19,6 @@ | |||
from .community.louvain import louvain | |||
from .centrality.katz_centrality import katz_centrality | |||
from .components.connectivity import weakly_connected_components | |||
from .sampling.uniform_neighbor_sample import uniform_neighbor_sample | |||
# FIXME: This call is deprecated and will be removed next release | |||
from .sampling.neighborhood_sampling import neighborhood_sampling |
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.
If you make a FIXME for the deprecation warning of the old neighborhood_sampling
, then this only lets the developers of cuGraph know that it's going away to be replaced by uniform_neighbor_sample
. Wouldn't it be better to wrap neighborhood_sampling
with a deprecation warning similar to some pylibcugraph calls?
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.
I did add a warning in pylibcugraph/neighborhood_sampling
and this FIXME is indeed for the cuGraph developers
python/pylibcugraph/cufile.log
Outdated
@@ -0,0 +1,3 @@ | |||
24-05-2022 11:57:57:955 [pid=3446 tid=3446] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded |
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 file should not be left in, I can relate though.
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.
Yep. I already have it removed locally but I am yet to push the changes
import dask_cudf | ||
import cudf | ||
|
||
from pylibcugraph.experimental import ( |
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 is super minor thing, but all of these except for uniform_neighbor_sample can be taken out of the experimental namespace
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.
Fixed
cupy_sources = copy_to_cupy_array(c_resource_handle_ptr, src_ptr) | ||
cupy_destinations = copy_to_cupy_array(c_resource_handle_ptr, dst_ptr) | ||
cupy_indices = copy_to_cupy_array_ids(c_resource_handle_ptr, index_ptr) | ||
#print("indices are \n", cupy_indices) |
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.
Here's a few print debug lines left over
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.
Fixed
import cudf | ||
|
||
|
||
def uniform_neighbor_sample(G, |
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.
Might want to add both this SG and the MG uniform_neighbor_sample
to the API docs
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.
Looks good, and a lot of the feedback I have is already posted by others. I just have one request below.
from cugraph.dask.sampling.uniform_neighbor_sample import \ | ||
uniform_neighbor_sample | ||
uniform_neighbor_sample = \ | ||
experimental_warning_wrapper(uniform_neighbor_sample) |
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.
We can immediately promote this to stable too, which means we'll be replacing the current MG neighborhood sampling algo with this one (a breaking change). We think this is okay though, since this was mainly added for DGL and the DGL effort is just starting to use cugraph MG neighbor sampling (IOW, we don't think this will actually break anyone).
Of course, since the old version was released in 22.04, there's no way to guarantee a community member isn't using it, but we still think the chance is small enough not to warrant the extra expense of maintaining two versions to support our normal deprecation process. I'll add a "breaking" label to this PR though too.
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.
I concur
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.
I agree. It didn't make it into the 22.04 release html docs, so a community member who used it had to have followed development closely.
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.
The tests LGTM, everything else looked good before, so I think this can be merged soon
@gpucibot merge |
A new implementation of neighborhood sampling meeting the new C API was merged.
This PR
proto
DO NOT MERGE YET: PENDING fix for missing vertices in
start_list
closes #2272