torchdrug icon indicating copy to clipboard operation
torchdrug copied to clipboard

[Question] How to make model training reproducible

Open bhadreshpsavani opened this issue 3 years ago • 1 comments

When we train a model for molecule property prediction it gives different results every time when we train the model. It varies a lot in terms of performance. That makes it difficult for comparing results for different models.

i followed this document randomness but i didn't work

bhadreshpsavani avatar Aug 02 '22 07:08 bhadreshpsavani

Hi! I think all the random functions used in TorchDrug relies on the random number generation of PyTorch, and they are controllable through torch.manual_seed.

One uncontrollable randomness is from the atomic operations in torch_scatter.scatter_add, which will causes a little bit deviation in floating point results even for the same input. But I don't think it will have large effects on the final performance.

KiddoZhu avatar Aug 14 '22 21:08 KiddoZhu