snap-stanford / ogb

Benchmark datasets, data loaders, and evaluators for graph machine learning
https://ogb.stanford.edu
MIT License
1.93k stars 397 forks source link

Creating Link Prediction Datasets with multiple graphs #245

Closed bits-glitch closed 3 years ago

bits-glitch commented 3 years ago

Hi OGB Team,

I am currently working on a link prediction project where I have multiple graphs.

My initial idea was to generate a link prediction dataset that features multiple graphs (of similar topology) and for instance, train on one graph, test on another graph and validate on a third graph.

If I generate the LinkPropPredDataset and load multiple graphs into my graph list, I am kindly reminded that LinkPropPredDataset does not support multiple graphs for Link Prediction tasks. Are you planning to support this in future releases or is the idea of train/test/valid on different graphs not particularly constructive? My current circumvention for this would be to load multiple OGB datasets (one for each graph) and pass each to a separate Dataloader in the link prediction step, but I am curious why LinkPropPredDataset are currently limited to only one graph. Thanks for the help!

weihua916 commented 3 years ago

Hi! Good question! We are not planning to support a link prediction dataset object for multiple graphs. If you would like to use multiple graphs, I would suggest you to use GraphPropPredDataset and define your link prediction task on top of it.