If you are using random, I suggest you look here:

pytorch : Reproducibility — PyTorch 1.8.1 documentation 1

numpy : numpy.random.seed — NumPy v1.15 Manual

python : random — Generate pseudo-random numbers — Python 3.9.4 documentation


I think it will allow you to have the same random split at all times.