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).
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 usingrandom.random
, instead only usingnumpy
(note, I'm not sure if ENTMOOT does userandom.random
, but that random state is set inProblemConfig
).