snap-stanford / ogb

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

how to obtain consistent output under the fixed hyperparameters and seeds? #441

Closed Elgiva closed 10 months ago

Elgiva commented 1 year ago

Hi there, I was running your code (https://github.com/snap-stanford/ogb/tree/master/examples/graphproppred/mol) and I noticed that even when I fixed the hyperparameters and seeds, the results vary slightly each time I run the program. Could you please provide some guidance on how to ensure that the program consistently produces the same results under fixed hyperparameters and seeds (in torch, torch.cuda and numpy) ? Thank you very much for your help!

weihua916 commented 10 months ago

Here is how you can fix all seeds.