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

Update emcee.py: don't try loading checkpoint file it is has zero size

parent 667a4863
No related branches found
No related tags found
1 merge request!1341Catch error if trying to load zero bytes resume file
This commit is part of merge request !1341. Comments created here will be created in the context of that merge request.
......@@ -311,7 +311,11 @@ class Emcee(MCMCSampler):
"""
if hasattr(self, "_sampler"):
pass
elif self.resume and os.path.isfile(self.checkpoint_info.sampler_file):
elif (
self.resume and
os.path.isfile(self.checkpoint_info.sampler_file) and
os.path.getsize(self.checkpoint_info.sampler_file)
):
import dill
logger.info(
......
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