Is there a way to uniquely spawn child seeds?
I`m doing monte carlo analysis, where I have n random processes, each with
their own generator.
All process models instantiate a generator with default_rng(). I.e
ss=SeedSequence() cs=ss.Spawn(n), and using cs[i] for process i. Now, the
problem I`m facing, is that results using individual process depends on
the order of the process initialization ,and the number of processes used.
However, if I could spawn children with a unique identifier, I would be
able to reproduce my individual results without having to pickle/log
states. For example, all my models have an id (tuple) field which is
If I had the ability to SeedSequence(x).Spawn([objects]) where objects
support hash(object), I would have reproducibility for all my processes. I
could do without the spawning, but then I would probably loose independence
when I do multiproc? Is there a way to achieve my goal in the current
version 1.21 of numpy?