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

LinkNeighborLoader: Tuple[FeatureStore, GraphStore] support #5037

Merged
merged 13 commits into from
Jul 26, 2022
Merged

Conversation

mananshah99
Copy link
Contributor

Supports the feature store / graph store abstraction for the link-level neighbor loader.

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #5037 (7c8a5c1) into master (ac6119b) will decrease coverage by 0.01%.
The diff coverage is 81.08%.

@@            Coverage Diff             @@
##           master    #5037      +/-   ##
==========================================
- Coverage   82.89%   82.87%   -0.02%     
==========================================
  Files         331      331              
  Lines       18160    18197      +37     
==========================================
+ Hits        15053    15081      +28     
- Misses       3107     3116       +9     
Impacted Files Coverage Δ
torch_geometric/loader/link_neighbor_loader.py 88.62% <73.07%> (-3.92%) ⬇️
torch_geometric/data/graph_store.py 92.68% <100.00%> (+0.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us.

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.

Approving to unblock: would be great to get rid of the num_src_nodes and num_dst_nodes arguments in the constructor. These should always be inferred IMO (even for GraphStore). The logic of inferring input edges is a bit complicated as well. I think we should either simplify it or refactor it to allow for GraphStore.coo(edge_type).

test/loader/test_link_neighbor_loader.py Outdated Show resolved Hide resolved
test/loader/test_link_neighbor_loader.py Outdated Show resolved Hide resolved
edge_types.index(self.input_type)].size

# Otherwise:
elif num_src_nodes is None or num_dst_nodes is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can‘t we access via FeatureStore.size in this case? Might be cooler since it will not require a change in input arguments.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FeatureStore.size is kind of broken since we currently need to provide an attribute to get the size, which is not available in general, which is why this approach was chosen :( Happy to refactor once we clean up size.

@mananshah99 mananshah99 merged commit 8a988f9 into master Jul 26, 2022
@mananshah99 mananshah99 deleted the lp_fs branch July 26, 2022 18:53
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.

2 participants