Skip to content

Commit

Permalink
Add seed at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Aug 6, 2024
1 parent 2f7b8e3 commit 0103d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from aurora import AuroraSmall, Batch, Metadata

torch.manual_seed(0)
torch.use_deterministic_algorithms(True)


Expand Down Expand Up @@ -80,7 +81,6 @@ def test_aurora_small() -> None:
# Load the checkpoint and run the model.
model.load_checkpoint(os.environ["HUGGINGFACE_REPO"], "aurora-0.25-small-pretrained.ckpt")
torch.manual_seed(0) # Very important to seed! The test data was generated using this.
torch.set_num_threads(1)
with torch.inference_mode():
pred = model.forward(batch)

Expand Down

0 comments on commit 0103d00

Please sign in to comment.