ptemcee parallelisation issue
A downstream user reported an issue with ptemcee on MacOS with parallelization.
I found that it works with the multiprocessing start method set to fork
, which is a temporary workaround.
As a fix, we need to make sure the _sampling_convenience_dump
works with the LikePriorEvaluator
.
An initial solution that seemed to work was to update the LikePriorEvaluator
as
def __init__(self):
from .base_sampler import _sampling_convenience_dump
self.periodic_set = False
self.dump = _sampling_convenience_dump
and then using self.dump
rather than _sampling_convenience_dump
throughout.
This might cause issues if emcee/kombine/zeus
pass the LikePriorEvaluator
through the multiprocessing pool.