From df82322619ab7b9ab5dd450af11e34c8046590e6 Mon Sep 17 00:00:00 2001 From: Daniel Franco Date: Fri, 8 Mar 2024 11:17:45 +0100 Subject: [PATCH] Fix preprocessing checking --- biapy/engine/check_configuration.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/biapy/engine/check_configuration.py b/biapy/engine/check_configuration.py index 60131e99..4d793e50 100644 --- a/biapy/engine/check_configuration.py +++ b/biapy/engine/check_configuration.py @@ -385,12 +385,12 @@ def check_configuration(cfg, jobname, check_data_paths=True): if cfg.DATA.EXTRACT_RANDOM_PATCH and cfg.DATA.PROBABILITY_MAP: if cfg.DATA.W_FOREGROUND+cfg.DATA.W_BACKGROUND != 1: raise ValueError("cfg.DATA.W_FOREGROUND+cfg.DATA.W_BACKGROUND need to sum 1. E.g. 0.94 and 0.06 respectively.") - if not cfg.DATA.TRAIN.IN_MEMORY and cfg.DATA.PREPROCESS.TRAIN: - raise ValueError('To use preprocessing DATA.TRAIN.IN_MEMORY needs to be True.') - if not cfg.DATA.VAL.IN_MEMORY and cfg.DATA.PREPROCESS.VAL: - raise ValueError('To use preprocessing DATA.VAL.IN_MEMORY needs to be True.') - if not cfg.DATA.TEST.IN_MEMORY and cfg.DATA.PREPROCESS.TEST: - raise ValueError('To use preprocessing DATA.TEST.IN_MEMORY needs to be True.') + if not cfg.DATA.TRAIN.IN_MEMORY and cfg.DATA.PREPROCESS.TRAIN: + raise ValueError('To use preprocessing DATA.TRAIN.IN_MEMORY needs to be True.') + if not cfg.DATA.VAL.IN_MEMORY and cfg.DATA.PREPROCESS.VAL: + raise ValueError('To use preprocessing DATA.VAL.IN_MEMORY needs to be True.') + if not cfg.DATA.TEST.IN_MEMORY and cfg.DATA.PREPROCESS.TEST: + raise ValueError('To use preprocessing DATA.TEST.IN_MEMORY needs to be True.') ### Pre-processing ### if cfg.DATA.PREPROCESS.TRAIN or cfg.DATA.PREPROCESS.TEST or cfg.DATA.PREPROCESS.VAL: