Skip to content
Snippets Groups Projects
Commit e44b2118 authored by Matthew David Pitkin's avatar Matthew David Pitkin
Browse files

Update ptemcee.py: require resume file to not be zero bytes

parent 05832fed
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !1341. Comments created here will be created in the context of that merge request.
......@@ -414,7 +414,11 @@ class Ptemcee(MCMCSampler):
# This is a very ugly hack to support numpy>=1.24
ptemcee.sampler.np.float = float
if os.path.isfile(self.resume_file) and self.resume is True:
if (
os.path.isfile(self.resume_file) and
os.path.getsize(self.resume_file) and
self.resume is True
):
import dill
logger.info(f"Resume data {self.resume_file} found")
......
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