Skip to content

Commit

Permalink
Fix windows numpy random
Browse files Browse the repository at this point in the history
  • Loading branch information
ejguan committed Apr 24, 2023
1 parent 55f326a commit 1813234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/dataloader2/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _random_fn(data):
Used to validate the randomness of subprocess-local RNGs are set deterministically.
"""
py_random_num = random.randint(0, 2 ** 32)
np_random_num = np.random.randint(0, 2 ** 32 - 1)
np_random_num = np.random.randint(0, 2 ** 32, dtype=np.uint32)
torch_random_num = torch.randint(0, 2 ** 32, size=[]).item()
return (data, py_random_num, np_random_num, torch_random_num)

Expand Down

0 comments on commit 1813234

Please sign in to comment.