NeighborLoader seed nodes not the first nodes in the batch #9822
Unanswered
Romain-Nicolle
asked this question in
Q&A
Replies: 1 comment
-
Update: to test whether or not it was a problem with my data object/code, I tried to rerun this script provided as an example for the NeighborLoader in Heterogeneous Graph. I run the beginning of the script and these lines:
And the output is:
This seems to confirm, that the seed_nodes (i.e. those given by input_id) are not the first nodes in the batch in my instance. Thank for any help. Best, EDIT: typo |
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi everyone,
I have a problem with the NeighborLoader() and I need some assistance.
I am using an Heterogeneous Graph with 5 node_types and 20 edge_types to perform node classification.
I am using these versions of these packages:
My HeteroData looks like that:
Due to the size of my HeteroData object, I need to perform mini-batch during training so I am using different Neighborloaders, more specifically I am using 3:
I will be using the HeteroConv layer and I want to get message_passing from the direct neighbors as well as the neighbors of the neighbors (2-hops away per edge_type). So my code looks like that:
It seems to me, according to the documentation of the NeighborLoader there, that the seed_nodes (the input_id) are supposed to be the first nodes in the batch.
Unfortunately, that is not always the case in my examples.
I mean, for some of the loaders it is true but not for all. It is causing errors in my code and I don't know what to do.
Will have this output:
So the input_id are not the first nodes in the batch ? And these lines:
Will have this output:
So the first_nodes in the batch are the same as in the previous batch ?
But for the train_loader:
Will have this output.
And
Will have this one
So the train_loader is working.
But the global_loader and the test_loader are not behaving properly.
Has anyone already experienced that ?
Do you know what I should do to correct that ?
A combinations of parameters maybe ?
num_workers, shuffle, replace
etc ?Any help would be greatly appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions