Skip to content

Commit

Permalink
exo cache naming issue now that data has temporal dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Oct 31, 2023
1 parent f406d7b commit 765dbd8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sup3r/preprocessing/data_handling/exogenous_data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ', '')
Expand Down

0 comments on commit 765dbd8

Please sign in to comment.