Skip to content
Snippets Groups Projects
Commit 2ffc83f9 authored by Matthew David Pitkin's avatar Matthew David Pitkin
Browse files

emcee.py: set __getstate__ attribute to allow use of pool

parent 31f18abe
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,13 @@ class Emcee(MCMCSampler):
def nsteps(self, nsteps):
self.kwargs['iterations'] = nsteps
def __getstate__(self):
# In order to be picklable with dill, we need to discard the pool
# object before trying.
d = self.__dict__
d["_Sampler__kwargs"]["pool"] = None
return d
def run_sampler(self):
import emcee
tqdm = get_progress_bar()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment