Skip to content

Commit

Permalink
Fix numpy random seed
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinfriede committed Dec 21, 2023
1 parent 9de93e9 commit fbc2afa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
"""
from __future__ import annotations

import numpy as np
import pytest
import torch

# avoid randomness and non-deterministic algorithms
np.random.seed(0)
torch.manual_seed(0)
torch.use_deterministic_algorithms(True)

Expand Down

0 comments on commit fbc2afa

Please sign in to comment.