LINT_UNSEEDED_RANDOM

CompileSeen in: The editor

What happened

The file draws random numbers from a source with no fixed seed. Two runs with the same settings then give different results, and neither can be reproduced.

What to do

Use ctx.rng inside hooks, or numpy.random.default_rng(seed) with a fixed seed elsewhere.

Example

text
strategy.py, line 12: This random source is not seeded, so two runs differ. Use ctx.rng in hooks, or numpy.random.default_rng(seed) with a fixed seed. [LINT_UNSEEDED_RANDOM]

The wording of the message depends on your file, and the code does not. A warning does not stop the file from loading.

Ask about this in the forum