uqfoundation / pathos

parallel graph management and execution in heterogeneous computing
http://pathos.rtfd.io
Other
1.39k stars 89 forks source link

add option to set different random seed for each process #40

Open mmckerns opened 9 years ago

mmckerns commented 9 years ago

multiprocessing has a known issue where certain global random states (and thus the seeds) are copied to all the spawned processes (most notably for anything depending on numpy.random). A potential fix for this is to provide processing (the pathos fork) or pathos.multiprocessing with a "set random_state" function. Then optionally, provide some API extension to enable easy triggering of the "special" seeding (i.e. generating a new random state for each process).

rdbisme commented 7 years ago

Has this been implemented at the end?

mmckerns commented 7 years ago

I don't think so. The code (linked above) is obviously there and working... but it's currently part of mystic. It probably should be moved to multiprocess or pathos.multiprocessing.