Skip to content
Snippets Groups Projects
Commit 6a8b89a9 authored by Colm Talbot's avatar Colm Talbot
Browse files

Fix checkpointing

parent 923d1563
No related branches found
No related tags found
1 merge request!754Allow dynesty to run with multiprocessing
Pipeline #115784 failed
......@@ -546,7 +546,8 @@ class Dynesty(NestedSampler):
self.sampler.versions = dict(
bilby=bilby_version, dynesty=dynesty_version
)
del self.sampler.pool, self.sampler.M
self.sampler.pool = None
self.sampler.M = map
if dill.pickles(self.sampler):
safe_file_dump(self.sampler, self.resume_file, dill)
logger.info("Written checkpoint file {}".format(self.resume_file))
......@@ -557,9 +558,7 @@ class Dynesty(NestedSampler):
)
self.sampler.pool = self.pool
if self.sampler.pool is not None:
self.sampler.M = self.sampler.pool.M
else:
self.sampler.M = map
self.sampler.M = self.sampler.pool.map
def plot_current_state(self):
......
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