From 765dbd845d9573db68bb8e4a7b3ef7fb0e3b4c55 Mon Sep 17 00:00:00 2001 From: bnb32 Date: Tue, 31 Oct 2023 12:45:15 -0600 Subject: [PATCH] exo cache naming issue now that data has temporal dimension --- .../data_handling/exogenous_data_handling.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sup3r/preprocessing/data_handling/exogenous_data_handling.py b/sup3r/preprocessing/data_handling/exogenous_data_handling.py index 5ff81b831..f8bda65a2 100644 --- a/sup3r/preprocessing/data_handling/exogenous_data_handling.py +++ b/sup3r/preprocessing/data_handling/exogenous_data_handling.py @@ -567,8 +567,12 @@ def get_cache_file(self, feature, s_enhance, t_enhance, s_agg_factor, cache_fp : str Name of cache file """ - fn = f'exo_{feature}_{self.target}_{self.shape}_sagg{s_agg_factor}_' - fn += f'tagg{t_agg_factor}_{s_enhance}x_{t_enhance}x.pkl' + tsteps = (None if self.temporal_slice.start is None + or self.temporal_slice.end is None + else self.temporal_slice.end - self.temporal_slice.start) + fn = f'exo_{feature}_{self.target}_{self.shape},{tsteps}' + fn += f'_sagg{s_agg_factor}_tagg{t_agg_factor}_{s_enhance}x_' + fn += f'{t_enhance}x.pkl' fn = fn.replace('(', '').replace(')', '') fn = fn.replace('[', '').replace(']', '') fn = fn.replace(',', 'x').replace(' ', '')