Skip to content

Commit

Permalink
Add fixture torch_seed to fixtures/torch.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NickleDave committed Feb 15, 2023
1 parent ff761ef commit 122e564
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/fixtures/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,12 @@ def get_test_dtypes() -> Dict[str, torch.dtype]:
@pytest.fixture()
def dtype(dtype_name) -> torch.dtype:
return TEST_DTYPES[dtype_name]


TORCH_SEED = 42


@pytest.fixture()
def torch_seed():
"""Value for seed used in tests"""
return TORCH_SEED

0 comments on commit 122e564

Please sign in to comment.