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

Problem Config should not use global random state #31

Open
TobyBoyne opened this issue Mar 8, 2024 · 0 comments
Open

Problem Config should not use global random state #31

TobyBoyne opened this issue Mar 8, 2024 · 0 comments

Comments

@TobyBoyne
Copy link
Collaborator

The suggested API for random number generation in numpy is to use Generator objects, instead of global state. This is because other code can interfere with global state, causing a lack of reproducibility. Changing the global random state outside of ENTMOOT code leads to inconsistent results.

I think we should have a ProblemConfig.rng attribute that handles all random number generation, for more consistency. I also think ENTMOOT should not be using random.random, instead only using numpy (note, I'm not sure if ENTMOOT does use random.random, but that random state is set in ProblemConfig).

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

No branches or pull requests

1 participant