diff --git a/mlair/run_modules/training.py b/mlair/run_modules/training.py index 53c023325d6ab94ff40c84b5e5ed1045f450f372..b0233eb4090fdd72b5635109c74dcfe388e44e37 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: