Catch error if trying to load zero bytes resume file
Currently, when loading a resume file, it assumes that dill.load()
will work successfully. This requires that the file is a valid pickle file, even if it an empty file (as generated by bilby_pipe for file transfer reasons). However, if would be useful if this could just be a generic zero bytes dummy file as output by, e.g., touch
.
This MR adds try...except
calls around dill.load()
to catch cases of zero bytes files, or checks for check point files being 0 bytes in size.
Edited by Matthew Pitkin
Merge request reports
Activity
assigned to @matthew-pitkin
added 1 commit
- 196d43a2 - Update emcee.py: don't try loading checkpoint file it is has zero size
added 1 commit
- 05832fed - Update kombine.py: resume file must not be an empty file
added 1 commit
- e44b2118 - Update ptemcee.py: require resume file to not be zero bytes
added 1 commit
- 658fae8b - Update sampler.py: don't read state from 0 bytes resume file
added <10 lines label
added 31 commits
-
e8a06668...36eb0eb8 - 30 commits from branch
lscsoft:master
- 39286147 - Merge branch bilby:master into catch_zero_bytes_file
-
e8a06668...36eb0eb8 - 30 commits from branch
added 7 commits
-
69ca3538 - 1 commit from branch
lscsoft:master
- 667a4863 - Update dynesty.py: catch error if trying to load zero bytes resume file
- d93c342c - Update emcee.py: don't try loading checkpoint file it is has zero size
- d36f6074 - Update kombine.py: resume file must not be an empty file
- 2b227d91 - Update ptemcee.py: require resume file to not be zero bytes
- ac725690 - Update sampler.py: don't read state from 0 bytes resume file
- 786a6c98 - Apply black
Toggle commit list-
69ca3538 - 1 commit from branch
enabled an automatic merge when the pipeline for 786a6c98 succeeds
changed milestone to %2.4.0
Please register or sign in to reply