Open pauvilasoler opened 4 weeks ago
What does data.validate()
return for you?
data.validate()
returns True for every HeteroData object in the Dataset.
I was thinking maybe it could be an issue with how the edge indices are encoded as the indices for the alters go from 1 to 25 (and maybe it should be from 0 to 24).
As an example here is how the edge indices for the relationship ('Alter', 'to', 'Ego') look like:
[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]
It was indeed this issue.
However, shouldn't data.validate() return False in cases like these where the indices are wrongly encoded?
Thanks a lot anyway!
data.validate()
just checks for invalid edges. It cannot automatically detect whether edges are semantically incorrect.
🐛 Describe the bug
Hi,
I am running into some issues when trying to run a Heterogeneous GNN on a custom-made dataset.
Context:
Basically, my dataset is a list of HeteroData (i.e. heterogeneous graphs) objects each of which has 1 node of the type 'Ego' and 25 nodes of the type 'Alter'. The edge types are ('Alter', 'to', 'Ego') (of which there are 25 for each graph > each of the 25 'Alters' is connected to the 'Ego') and ('Alter', 'to', 'Alter') (of which there are variable numbers for each graph). The first of these edge types have attributes whereas the latter do not.
More specifically, this is what the data looks like:
Regarding the model, I am using the Heterogeneous Convolution Wrapper (HeteroConv) that you can see below:
However, the issue arises when training the model as in:
Here is the error message:
I have noticed that a similar issue was raised in https://github.com/pyg-team/pytorch_geometric/issues/4588 but the solutions provided there are not working for my (Heterogeneous) case.
On top of this, an additional exception is raised which would seem to me to be related:
I would appreciate any help or ideas.
Thanks a lot!
Versions
Environment (yaml)
name: predicting-GNNs channels:
dependencies: