Setting pymc3 random seed at once

Is there a way to set the random seed of pymc3 at once without specifying it at every method call?

**setting numpy random seed did not work.

How do you know that np.random.seed didn’t work? Seems like there was a discussion about this quite sometime back:

@narendramukherjee thanks for pointing that out. I conclude that according to my observations.

I tried setting np.random.seed and still I got different results (if I do sampling or PPC) for multiple runs of the same script. However, setting random_seed parameter of the sample() method or sample_ppc() provide the same results.

Could you file as a bug a short script that gets the wrong results? (or write it here and I can file)

Our intention is that you could set the random seed once anywhere - in a method call or not - and everything after would be deterministic. I think some of the variational inference API might not respect that yet, since it is using theano’s random number generator instead of numpy’s, but it would be good to enforce that rule.

I am not completely sure, but i think if we enforce the global random see it might generate error in multi chain, as it will return identical chains.

Oooh, good point: I think if a random seed is set in the method, we draw a random seed and send it to each of the processes, but don’t if there is no random seed set.

Maybe it makes sense to do that every time?