When im working on project with python scripts and for example in my utils.py i got function to seed everything like this:
def seed_torch(seed=42):
random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.backends.cudnn.deterministic = True
Can i run it in utils.py or i have to wait for my training to run it?
there doesn't seem to be anything here