Skip to content

Conversation

@tohtana
Copy link
Collaborator

@tohtana tohtana commented Sep 10, 2025

pytest-randomly often passes a large seed value to set_random_seed and causes an error (example)

E ValueError: Seed must be between 0 and 2**32 - 1

This PR limits the range of seed values by taking a modulo.

Signed-off-by: Masahiro Tanaka <[email protected]>
@tohtana tohtana requested a review from tjruwase as a code owner September 10, 2025 17:25
@tohtana tohtana changed the title limit random seed range in tests Limit random seed range in tests Sep 10, 2025
@tohtana tohtana enabled auto-merge (squash) September 10, 2025 17:31
@tohtana tohtana merged commit 0012ff6 into master Sep 10, 2025
12 checks passed
@tohtana tohtana deleted the tohtana/modulo_test_random_seed branch September 10, 2025 17:45
mauryaavinash95 pushed a commit to DataStates/DeepSpeed that referenced this pull request Oct 4, 2025
`pytest-randomly` often passes a large seed value to `set_random_seed`
and causes an error
([example](https://github.com/deepspeedai/DeepSpeed/actions/runs/17620450004/job/50064585974))
```
E ValueError: Seed must be between 0 and 2**32 - 1
```

This PR limits the range of seed values by taking a modulo.

Signed-off-by: Masahiro Tanaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants