-
Notifications
You must be signed in to change notification settings - Fork 92
Self-loops management in KNNGraph and RadiusGraph #522
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
Conversation
|
Hi @FilippoOlivo! See here for reference: https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.pool.radius_graph.html#torch_geometric.nn.pool.radius_graph What do you think, @dario-coscia? |
yes maybe it is the best option! |
c937ecc to
bb143d4
Compare
|
Since the codacy warning is "intentional" and unavoidable in our case, I suggest to manually suppress it. @ndem0 @dario-coscia what do you think? |
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 don't like a lot the fact that loop is hard coded for both methods. I suggest to add the loop attribute in GraphBuilder __new__ method and use the PyG function remove_self_loops once the edge_index is created. This way you just need to touch GraphBuilder
A possible inconsistency arises with KNNGraph. K should include or not self loops? |
Why inconsistency? I would say that |
|
Everything looks good to me, I merge in dev. |
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
* Add self-loop option to RadiusGraph and KNNGraph
Fixes #521