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
betochimas
left a comment
There was a problem hiding this comment.
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
| 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.
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.
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.
This file should not be left in, I can relate though.
There was a problem hiding this comment.
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.
This is super minor thing, but all of these except for uniform_neighbor_sample can be taken out of the experimental namespace
| 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.
Here's a few print debug lines left over
| import cudf | ||
|
|
||
|
|
||
| def uniform_neighbor_sample(G, |
There was a problem hiding this comment.
Might want to add both this SG and the MG uniform_neighbor_sample to the API docs
rlratzel
left a comment
There was a problem hiding this comment.
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.
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.
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.
betochimas
left a comment
There was a problem hiding this comment.
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
protoDO NOT MERGE YET: PENDING fix for missing vertices in
start_listcloses #2272