-
Notifications
You must be signed in to change notification settings - Fork 533
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
Support for precomputed distance matrix in DBSCAN #3585
Support for precomputed distance matrix in DBSCAN #3585
Conversation
…ore robust to index overflows with the distance matrix, test multi-batch cases
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.
Thanks @Nyrio for the PR! It looks good in general, I have just marked a few smaller issues.
Please file an issue about the MNMG case with distributed data, to promote discussion on its priority.
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.
Thanks @Nyrio for the update. Changes look good in general, there are only some minor things left:
- Fix the failing
test_base_children_get_param_names
unit test by adding'metric'
toget_param_names()
in dbscan.pyx. - The PR description will be added as a commit message of the merge commit. I think the TODO section can be removed from the description.
- Consider linking the original feature request with the appropriate keyword.
- Please file an issue about "distance matrix that is scattered across the nodes".
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.
Thanks Louis for the update! The PR looks good to me.
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.
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.
Sorry for the delayed review, long week of reviews. Just had one question and one very minor suggestion to improve the python docstring, then it looks good in the Python side as well.
Blocked waiting on RAFT change |
Suggested by @dantegd in: rapidsai/cuml#3585 (comment) Authors: - Louis Sugy (@Nyrio) Approvers: - Thejaswi. N. S (@teju85) URL: #177
@dantegd @teju85 I made the change to use
If I comment line 259, it compiles. The problem doesn't seem to be a special character, I've tried rewriting this line from scratch, also it compiles when commented. I don't see why the enum value would cause that either, the value is 100, which is under 256. I'm quite confused. Does someone know what's happening here? |
@Nyrio that's quite an odd issue, I would suggest merging branch-0.19 into the branch of the PR (to solve the copyright issues) and then we can see if the unicode error persists. |
# Conflicts: # cpp/cmake/Dependencies.cmake
Edit: it works with 11.2. The dependency issue was with 11.0 |
Update: I managed to solve my dependency issues with 11.2 but the problem of the odd codec error persists. I've also tried using contiguous values in the enum, which didn't seem to work. |
I confirm the problem with the enum. Python install fails as long as we have the A workaround is to rename the enum to |
It turns out it was an encoding bug, with an invisible character that didn't appear in the editor. Fixed. |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #3585 +/- ##
================================================
- Coverage 80.70% 45.34% -35.37%
================================================
Files 227 224 -3
Lines 17615 17189 -426
================================================
- Hits 14217 7794 -6423
- Misses 3398 9395 +5997
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@gpucibot merge |
Closes #3302
Notes about performance
If we don't count the cost of pre-computing the distance matrix (which is done by the user), the single-GPU code runs slightly faster when the distance matrix is pre-computed. (note: this is 2d, greater speedups expected for larger dimensions!)
As I have stated in a comment in the code, it works with two kernels: one that uses a coalesced reduction to compute the vertex degrees from the distance matrix, and one that uses a 2D copy fused with an unary operation to get the boolean neighborhood matrix.
Note: the performance of this step could be better if
adj
was a row-major B*N matrix instead of column-major. We could fuse everything into one efficient kernel. It is something to keep in mind when we re-writecsr_adj_graph_batched
.Notes about MNMG
Cf #3615