pymc-devs / pymc-experimental

https://pymc-experimental.readthedocs.io
Other
72 stars 47 forks source link

Implement jsonification of rng seed for sampler_config #224

Open michaelraczycki opened 11 months ago

michaelraczycki commented 11 months ago

So far rng seed cannot be passed to sampler_config, because json supports only primitive datatypes like integer, float etc. Potential solutions to this is to create a helper function that will be triggered during load, and pass the integer (or whatever was used to generate the original seed) to rng.

michaelraczycki commented 11 months ago

@ricardoV94 @twiecki do you have other ideas on how to solve that, or you think my solution should be enough?

twiecki commented 11 months ago

I think that sounds good enough.

ricardoV94 commented 11 months ago

How will the seed be used across different methods? There are multiple methods that accept seeding, not just fit

ricardoV94 commented 11 months ago

What am I trying to ask is whether we want to store the seed, I am not sure. Btw seeding is not reproducible across different OSes if that shines any light on the usefulness of storing it.

In general it seems to me that the ModelBuilder is very focused on the fit step, but forgets there is a whole more to the Bayesian workflow (prior predictive, posterior predictive, predictions) that seem to be second citizen here (there's no place for them in "config"). I am not convinced there should be, but also not for fit.