Skip to content
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

Merged
merged 9 commits into from
May 15, 2022
Merged

HeteroData.subgraph() #4635

merged 9 commits into from
May 15, 2022

Conversation

wsad1
Copy link
Member

@wsad1 wsad1 commented May 13, 2022

Closes #4001.

This PR adds subgraph to HeteroData.

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #4635 (30edadc) into master (90fa81d) will increase coverage by 0.03%.
The diff coverage is 95.83%.

@@            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     
Impacted Files Coverage Δ
torch_geometric/data/hetero_data.py 94.38% <95.83%> (+0.46%) ⬆️
torch_geometric/data/storage.py 80.69% <0.00%> (+0.63%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90fa81d...30edadc. Read the comment docs.

@wsad1 wsad1 requested review from Padarn and rusty1s and removed request for Padarn May 13, 2022 10:02
)

Args:
subset (Dict[str, Tensor or BoolTensor]): A dictonary holding the
Copy link
Contributor

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?

Copy link
Member

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.

@rusty1s rusty1s changed the title Hetero subgraph HeteroData.subgraph() May 15, 2022
Copy link
Member

@rusty1s rusty1s left a 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 :))

@rusty1s rusty1s merged commit 9c5cbb2 into pyg-team:master May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HeteroData.subgraph()
3 participants