Error from 'sampling_time' variable in linear_regression.py example
When running the latest version (v0.5.4) using dynesty I get an error when it tries to read in a saved checkpoint file. E.g., running the linear_regression.py example gives:
17:06 bilby INFO : Running bilby version: 0.5.4: (CLEAN) 567d707b 2019-07-29 22:57:56 -0500
17:06 bilby INFO : Running for label 'linear_regression', output will be saved to 'outdir'
17:06 bilby INFO : Search parameters:
17:06 bilby INFO : m = Uniform(minimum=0, maximum=5, name='m', latex_label='m', unit=None, boundary=None)
17:06 bilby INFO : c = Uniform(minimum=-2, maximum=2, name='c', latex_label='c', unit=None, boundary=None)
17:06 bilby INFO : Single likelihood evaluation took 4.830e-05 s
17:06 bilby INFO : Using sampler Dynesty with kwargs {'bound': 'multi', 'sample': 'unif', 'verbose': True, 'periodic': None, 'check_point_delta_t': 600, 'nlive': 500, 'first_update': None, 'walks': 60, 'npdim': None, 'rstate': None, 'queue_size': None, 'pool': None, 'use_pool': None, 'live_points': None, 'logl_args': None, 'logl_kwargs': None, 'ptform_args': None, 'ptform_kwargs': None, 'enlarge': None, 'bootstrap': None, 'vol_dec': 0.5, 'vol_check': 2.0, 'facc': 0.5, 'slices': 5, 'update_interval': 300, 'print_func': <bound method Dynesty._print_func of <bilby.core.sampler.dynesty.Dynesty object at 0x7f6678c9a4a8>>, 'dlogz': 0.1, 'maxiter': None, 'maxcall': None, 'logl_max': inf, 'add_live': True, 'print_progress': True, 'save_bounds': False}
17:06 bilby INFO : Checkpoint every n_check_point = 10000000
17:06 bilby INFO : Reading resume file outdir/linear_regression_resume.pickle
17:06 bilby INFO : Succesfuly read resume file outdir/linear_regression_resume.pickle
Traceback (most recent call last):
File "linear_regression.py", line 61, in <module>
label=label)
File "/home/matthew/miniconda2/envs/bilby-dev/lib/python3.7/site-packages/bilby-0.5.4-py3.7.egg/bilby/core/sampler/__init__.py", line 174, in run_sampler
result = sampler.run_sampler()
File "/home/matthew/miniconda2/envs/bilby-dev/lib/python3.7/site-packages/bilby-0.5.4-py3.7.egg/bilby/core/sampler/dynesty.py", line 227, in run_sampler
out = self._run_external_sampler_with_checkpointing()
File "/home/matthew/miniconda2/envs/bilby-dev/lib/python3.7/site-packages/bilby-0.5.4-py3.7.egg/bilby/core/sampler/dynesty.py", line 269, in _run_external_sampler_with_checkpointing
resume = self.read_saved_state(continuing=True)
File "/home/matthew/miniconda2/envs/bilby-dev/lib/python3.7/site-packages/bilby-0.5.4-py3.7.egg/bilby/core/sampler/dynesty.py", line 350, in read_saved_state
self.sampling_time += datetime.timedelta(seconds=saved['sampling_time'])
KeyError: 'sampling_time'
This suggests that sampling_time
is not getting output into the saved file. Does anyone know what's going on? This wasn't a problem in earlier versions.