handley-lab / lsbi

Linear Simulation Based Inference
MIT License
2 stars 0 forks source link

Legacy rng #41

Open yallup opened 1 month ago

yallup commented 1 month ago

Describe the bug Currently lsbi uses legacy rng capabilities in numpy Suggestion is to give all instances of model a seed and follow recommendations: https://numpy.org/doc/stable/reference/random/generator.html

Why Want to create reference “random” test cases, i.e. a fixed seed for model parameters. However this legacy seeding needs to be set globally, the users script owns the random number generator rather than the Generative Model, I’m not sure this is the best design and I could see this causing problems

design seems slightly tricky as multivariate_normal in the lsbi code would need to take a generator as argument then? Thoughts welcome