-
Notifications
You must be signed in to change notification settings - Fork 151
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
Enable returning distances from knn and knn_graph #133
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 77 116 +39
=========================================
+ Hits 77 116 +39 ☔ View full report in Codecov by Sentry. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
This pull request had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. |
TL;DR Add a switch for
knn
andknn_graph
to enable returning distances alongside the edge_index.This code has been tested on CPU and CUDA 11.3 with PyTorch 1.11.0 on Ubuntu 18.04.
Related: pyg-team/pytorch_geometric#3010
I still cannot directly decorate
knn
andknn_graph
with@torch.jit.script
per your suggestions (pyg-team/pytorch_geometric#3010 (comment)). So I took a slightly different approach which was similar to pytorch/pytorch#37986. Though@torch.jit.script
has to be removed from the above two functions, the code that uses those two functions can be correctly jitted. Is it OK with you? @rusty1s