From 05832fed3f6f025201cb140717b239f061f1cf18 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin <matthew.pitkin@ligo.org> Date: Thu, 29 Feb 2024 15:16:22 +0000 Subject: [PATCH] Update kombine.py: resume file must not be an empty file --- bilby/core/sampler/kombine.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bilby/core/sampler/kombine.py b/bilby/core/sampler/kombine.py index 1f09387cc..b11a9cec4 100644 --- a/bilby/core/sampler/kombine.py +++ b/bilby/core/sampler/kombine.py @@ -165,7 +165,11 @@ class Kombine(Emcee): return self.sampler.chain[:nsteps, :, :] def check_resume(self): - return self.resume and os.path.isfile(self.checkpoint_info.sampler_file) + return ( + self.resume and + os.path.isfile(self.checkpoint_info.sampler_file) and + os.path.getsize(self.checkpoint_info.sampler_file) > 0 + ) @signal_wrapper def run_sampler(self): -- GitLab