We are trying to use Dynesty within the Bilby framework from LIGO, parallelized via MPI.
One issue we hit is that Python 3's built-in pickle module can't pickle "module" objects, and the "Sampler.rstate" object was the numpy.random module:
rstate: <class 'module'> <module 'numpy.random' from '/usr/local/lib/python3.7/site-packages/numpy/random/__init__.py'>
Now, it's entirely possible this is user error (we're using the simplest Gaussian example in bilby, so not setting rstate explicitly, etc). It's also possible that this is a horrible idea of how to work around the issue... if one did want to override the rstate, this wouldn't get transmitted to Pool workers...
BUT, this (along with a small patch to bilby) does allow us to run in parallel using MPI!
Hi,
We are trying to use Dynesty within the Bilby framework from LIGO, parallelized via MPI.
One issue we hit is that Python 3's built-in pickle module can't pickle "module" objects, and the "Sampler.rstate" object was the numpy.random module:
Now, it's entirely possible this is user error (we're using the simplest Gaussian example in bilby, so not setting rstate explicitly, etc). It's also possible that this is a horrible idea of how to work around the issue... if one did want to override the rstate, this wouldn't get transmitted to Pool workers...
BUT, this (along with a small patch to bilby) does allow us to run in parallel using MPI!