-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
HeteroData.subgraph()
#4635
HeteroData.subgraph()
#4635
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4635 +/- ##
==========================================
+ Coverage 82.93% 82.96% +0.03%
==========================================
Files 316 316
Lines 16750 16773 +23
==========================================
+ Hits 13891 13916 +25
+ Misses 2859 2857 -2
Continue to review full report at Codecov.
|
torch_geometric/data/hetero_data.py
Outdated
) | ||
|
||
Args: | ||
subset (Dict[str, Tensor or BoolTensor]): A dictonary holding the |
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.
Do you think its worth allowing also List[str]
when you just want to filter node types out?
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.
Good idea. Let's do this in a separate PR since I am not sure we want to re-use subgraph
for this due its expensive re-labeling computation.
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.
Thank you (and welcome back :))
Closes #4001.
This PR adds
subgraph
toHeteroData
.