Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider allowing user to specify RNG seed in config #116

Open
drewoldag opened this issue Nov 12, 2024 · 1 comment
Open

Consider allowing user to specify RNG seed in config #116

drewoldag opened this issue Nov 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@drewoldag
Copy link
Collaborator

I'm really on the fence about this particular thought.

Pros:
Reproducibility

Cons:
Easy for someone to forget/copy and introduce a subtle "bug" that could be very hard to figure out

For something like demonstrations or testing, this could be very helpful, but again, it leaves the door open for mistakes that would otherwise be easy to avoid.

@drewoldag drewoldag added the enhancement New feature or request label Nov 12, 2024
@mtauraso
Copy link
Collaborator

mtauraso commented Dec 2, 2024

Doesn't completely address the con, but we could Have two configs: use_system_rng (t/f). and rng_seed (number). We could preference rng_seed_from_system over rng_seed.

The idea here is that in order to get the "dangerous to science" behavior of having a set rng seed, you have to change 2 values, but in order to verify that you have the "safe for science" behavior of using the system prng, you only have to check 1 value (use_system_rng).

The defaults would be: use_system_rng: true, rng_seed: false where "false" falls back to the system RNG unless the user specifies a seed.

In cases where the user specifies only one value there would be an error message designed to get them on the right track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants