Skip to content
Snippets Groups Projects
Commit d36f6074 authored by Matthew David Pitkin's avatar Matthew David Pitkin Committed by Colm Talbot
Browse files

Update kombine.py: resume file must not be an empty file

parent d93c342c
No related branches found
No related tags found
1 merge request!1341Catch error if trying to load zero bytes resume file
......@@ -166,7 +166,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):
......
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