Skip to content

Commit

Permalink
yikes there are even more random seeds!
Browse files Browse the repository at this point in the history
  • Loading branch information
timvieira committed Jun 18, 2024
1 parent d0b71e6 commit 86b6d4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion genparse/steer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@

def set_seed(seed):
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
transformers.set_seed(seed)
np.random.seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)


# ____________________________________________________________________________________
Expand Down

0 comments on commit 86b6d4e

Please sign in to comment.