Skip to content

Conversation

mkolodner-sc
Copy link
Collaborator

Scope of work done

  • This test adds an explicit test validating the correctness of the produced edge index tensor in a HeteroData object

Where 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

Comment on lines +1145 to +1161
# 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]])
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

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)
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants