From ad2450a274bc451c45e0677f10f88a0786d0eaab Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Fri, 13 May 2022 12:00:07 +0200 Subject: [PATCH] check for none in epoch best --- mlair/run_modules/training.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlair/run_modules/training.py b/mlair/run_modules/training.py index 53c02332..b0233eb4 100644 --- a/mlair/run_modules/training.py +++ b/mlair/run_modules/training.py @@ -166,7 +166,8 @@ class Training(RunEnvironment): workers=psutil.cpu_count(logical=False)) history = hist epoch_best = checkpoint.epoch_best - logging.info(f"best epoch: {epoch_best + 1}") + if epoch_best is not None: + logging.info(f"best epoch: {epoch_best + 1}") try: lr = self.callbacks.get_callback_by_name("lr") except IndexError: -- GitLab