diff --git a/test/dataloader2/test_random.py b/test/dataloader2/test_random.py index 4b1a49728..90f06d964 100644 --- a/test/dataloader2/test_random.py +++ b/test/dataloader2/test_random.py @@ -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)