I’m running a model  written in PyTorch  in Colab on P100 GPU and I have set all the seeds using the following code
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
np.random.seed(seed)
random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)

Apart from the above, I have set seed value wherever it is required in the code.
I’m able to get reproducible results only when I run the code in the same session. When I close the session and then rerun the code in a new session, results are varying.
Is it not possible to get reproducible results using PyTorch in Colab? @smth @ptrblck