Closed asaluja closed 4 years ago
One possibility is that the sampler can not get enough negative nodes for a batch. How large is your graph? Can you try to reduce your batchsize?
I have around 1 million nodes and 4.5 million edges. I don't think it's batch size since I've tried reducing the batch size to 1 and the number of negative samples to 1 and I still get the same error.
I think you can refer to how eval sampler samples edges: https://github.com/awslabs/dgl-ke/blob/de4e970c9ffa45cae7d74139f4b3b38365f6c3ad/python/dglke/dataloader/sampler.py#L500
This gives another way to exclude positive edges
OK thanks I'll look into that. Wondering though if the above is a bug or if I'm doing something wrong?
You need to use return_false_neg and we will look at if there is any bug in exclude_positive=True
I needed to make some changes to the train script, in particular I wanted to change the head and tail samplers in training to
exclude_positive=True
here and here, but as soon as I do that this assert in dgl fails:Am I using the sampler incorrectly here?