From d748d431c9aaad8f785941c8516fcdcd3f592c41 Mon Sep 17 00:00:00 2001 From: smathot Date: Wed, 9 Aug 2023 11:28:00 +0200 Subject: [PATCH] braindecode_utils: preload automatically set to True --- eeg_eyetracking_parser/braindecode_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeg_eyetracking_parser/braindecode_utils.py b/eeg_eyetracking_parser/braindecode_utils.py index 017a48f..43c8cb7 100644 --- a/eeg_eyetracking_parser/braindecode_utils.py +++ b/eeg_eyetracking_parser/braindecode_utils.py @@ -116,6 +116,9 @@ def decode_subject(read_subject_kwargs, factors, epochs_kwargs, trigger, raise ValueError('epochs should >= 2') if not isinstance(n_fold, int) or epochs < 2: raise ValueError('n_fold should >= 2') + if not epochs_kwargs.get('preload', True): + raise ValueError('Epochs need to be preloaded') + epochs_kwargs['preload'] = True dataset, labels, metadata = read_decode_dataset( read_subject_kwargs, factors, epochs_kwargs, trigger, epochs_query, window_size=window_size, window_stride=window_stride,