Skip to content
Snippets Groups Projects
Commit e60e446a authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Touch the resume file if pickling fails

parent 0c06ce2b
No related branches found
No related tags found
1 merge request!1151Resolve "Bilby MCMC: Sampler gets stuck when checkpoint fails"
Pipeline #452372 passed
...@@ -2,6 +2,7 @@ import datetime ...@@ -2,6 +2,7 @@ import datetime
import os import os
import time import time
from collections import Counter from collections import Counter
from pathlib import Path
import numpy as np import numpy as np
import pandas as pd import pandas as pd
...@@ -387,9 +388,10 @@ class Bilby_MCMC(MCMCSampler): ...@@ -387,9 +388,10 @@ class Bilby_MCMC(MCMCSampler):
logger.info("Written checkpoint file {}".format(self.resume_file)) logger.info("Written checkpoint file {}".format(self.resume_file))
else: else:
logger.warning( logger.warning(
"Cannot write pickle resume file! " "Cannot write pickle resume file! " "Job may not resume if interrupted."
"Job will not resume if interrupted."
) )
# Touch the file to postpone next check-point attempt
Path(self.resume_file).touch(exist_ok=True)
self.ptsampler.pool = _pool self.ptsampler.pool = _pool
def print_long_progress(self): def print_long_progress(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