-
Notifications
You must be signed in to change notification settings - Fork 9
Add test to ensure subgraph edges are correct given an edge direction #317
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
base: main
Are you sure you want to change the base?
Conversation
| # We define the graph here so that we have edges | ||
| # User -> Story | ||
| # 0 -> 0 | ||
| # 1 -> 1 | ||
| # 2 -> 2 | ||
| # 3 -> 3 | ||
| # 4 -> 4 | ||
|
|
||
| # Story -> User | ||
| # 0 -> 1 | ||
| # 1 -> 2 | ||
| # 2 -> 3 | ||
| # 3 -> 4 | ||
| # 4 -> 0 | ||
|
|
||
| user_to_story_edge_index = torch.tensor([[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]) | ||
| story_to_user_edge_index = torch.tensor([[0, 1, 2, 3, 4], [1, 2, 3, 4, 0]]) |
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.
is it possible for us to create some graphviz/etc for this graph and what is expected/etc?
Can be hard to visualize just looking at COO :P
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.
https://dreampuf.github.io/GraphvizOnline is a handy tool here.
| edge_type in possible_edge_indices | ||
| ), f"User HeteroData contains edge type {edge_type} that is not in the expected graph edge types: {list(possible_edge_indices.keys())}" | ||
| matches = global_edge_index == possible_edge_indices[edge_type] | ||
| column_matches = matches.all(dim=0) |
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 we use this car ever? Also can we document precisely what we're checking for here?
Scope of work done
HeteroDataobjectWhere is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO