Replies: 1 comment 2 replies
-
The recommended approach for this is to still add these node types to all graphs, but attach empty tensors to it, e.g.,
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I'm working with a dataset which contains two vertex types, let's call them A and B. Not all graphs contain both types of vertex, which is expected to happen, but seems to cause problems with the default collate_fn. In particular, an error is thrown when dataloaders encounters a batch where some graphs have node type B, and others do not:
"Sizes of tensors must match except in dimension 0. Expected size 0 but got size 54 for tensor number 8 in the list"
My data is structured as a parquet dataset, where each record is a graph, and feature matrices are specified like so:
If a record lacks any vertices of type B, the values of features__typeB is just an empty array, []
Everything works if I insert into features__typeB a single subarray of the appropriate length, but this feels hacky, and I'm not sure if it'll cause modeling issues. My question is, what is the appropriate correction here?
Beta Was this translation helpful? Give feedback.
All reactions