From cba643d42a90ddcb54943184387f1454a95e229e Mon Sep 17 00:00:00 2001 From: Moritz <email@moritz-huebner.de> Date: Wed, 27 Feb 2019 17:01:30 +1100 Subject: [PATCH] Switched on checkpointing by default in cpnest --- CHANGELOG.md | 1 + bilby/core/sampler/cpnest.py | 4 ++-- test/sampler_test.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15849cfb0..6fe3934b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Use pickling to store the dynesty resume file and add a write-to-resume on SIGINT/SIGKILL - Bug fix in ROQ likelihood - Distance and phase marginalisation work with ROQ likelihood +- Cpnest now creates checkpoints (resume files) by default ### Removed - diff --git a/bilby/core/sampler/cpnest.py b/bilby/core/sampler/cpnest.py index 0936900f5..0f1cd8780 100644 --- a/bilby/core/sampler/cpnest.py +++ b/bilby/core/sampler/cpnest.py @@ -28,7 +28,7 @@ class Cpnest(NestedSampler): The maximum number of MCMC steps to take verbose: Bool (True) If true, print information information about the convergence during - resume: Bool (False) + resume: Bool (True) Whether or not to resume from a previous run output: str Where to write the CPNest, by default this is @@ -36,7 +36,7 @@ class Cpnest(NestedSampler): """ default_kwargs = dict(verbose=1, nthreads=1, nlive=500, maxmcmc=1000, - seed=None, poolsize=100, nhamiltonian=0, resume=False, + seed=None, poolsize=100, nhamiltonian=0, resume=True, output=None) def _translate_kwargs(self, kwargs): diff --git a/test/sampler_test.py b/test/sampler_test.py index 3054ad4ae..b11997c4d 100644 --- a/test/sampler_test.py +++ b/test/sampler_test.py @@ -112,7 +112,7 @@ class TestCPNest(unittest.TestCase): def test_default_kwargs(self): expected = dict(verbose=1, nthreads=1, nlive=500, maxmcmc=1000, - seed=None, poolsize=100, nhamiltonian=0, resume=False, + seed=None, poolsize=100, nhamiltonian=0, resume=True, output='outdir/cpnest_label/') self.assertDictEqual(expected, self.sampler.kwargs) -- GitLab