According to the reproducibility session of Pytorch Doc, we can set seed for random number generator in Pytorch, python, and numpy-related libraries respectively.
import torch torch.manual_seed(0) import random random.seed(0) import numpy as np np.random.seed(0)
For a generic ML workflow, involving numpy-based libraries, like scikit-learn; and pytorch, etc. The best practice to ensure reproducibility is to set the seed using all the above three ways. Is that right?