jonathonmellor / mimesis-stats

MIT License
5 stars 0 forks source link

Seed approach #1

Open jonathonmellor opened 2 years ago

jonathonmellor commented 2 years ago
jonathonmellor commented 2 years ago

within distribution setting the global numpy seed, if it inherits the value from the Field this won't be an issue in typical use but unsatisfactory. Bump numpy version to use np.default_rng(seed) instead in future if version isn't an issue.

jonathonmellor commented 2 years ago

mimesis can set a seed just via random which is not suitable for numpy approaches.

Tests needed to determine whether it works.

jonathonmellor commented 2 years ago

Can't test seed setting easily.

jonathonmellor commented 2 years ago

Removed instances of random in favour of consistent numpy.random approaches to avoid missed seed setting.

jonathonmellor commented 2 years ago

Need to scope what the implications of a numpy bump would be. Branch refactor test?

rng can be accessed via schema object or field? Global approach works well in this respect decoupling any custom functions from the object calls

jonathonmellor commented 2 years ago

Needs to be sorted before integration tests will work across versions. Regression test example failed due to different rng implimentations across versions.