From 735f7a86ee78eb6e68d9985718427512c2b76d6f Mon Sep 17 00:00:00 2001 From: torradocacho Date: Tue, 10 Sep 2024 17:17:12 +0200 Subject: [PATCH] output: attr to handle "old input but no resume" --- cobaya/output.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cobaya/output.py b/cobaya/output.py index 30e1cd426..552ca2334 100644 --- a/cobaya/output.py +++ b/cobaya/output.py @@ -376,7 +376,8 @@ def __init__(self, prefix, resume=resume_default, force=False, infix=None): self.log.info("Output to be read-from/written-into folder '%s', with prefix '%s'", self.folder, self.prefix) self._resuming = False - if os.path.isfile(self.file_updated): + self._has_old_updated_info = os.path.isfile(self.file_updated) + if self._has_old_updated_info: self.log.info( "Found existing info files with the requested output prefix: '%s'", prefix) @@ -388,6 +389,11 @@ def __init__(self, prefix, resume=resume_default, force=False, infix=None): # Only in this case we can be sure that we are actually resuming self._resuming = True self.log.info("Let's try to resume/load.") + else: + self.log.debug( + "There was old updated info, but no resume or force requested. " + "Behavior will be handled by sampler." + ) @mpi.root_only def create_folder(self, folder):