diff --git a/src/timesfm/timesfm_2p5/timesfm_2p5_flax.py b/src/timesfm/timesfm_2p5/timesfm_2p5_flax.py index aec4079..acd354b 100644 --- a/src/timesfm/timesfm_2p5/timesfm_2p5_flax.py +++ b/src/timesfm/timesfm_2p5/timesfm_2p5_flax.py @@ -509,7 +509,7 @@ class TimesFM_2p5_200M_flax(timesfm_2p5_base.TimesFM_2p5): self.model.o, new_horizon := math.ceil(fc.max_horizon / self.model.o) * self.model.o, ) - forecast_config = dataclasses.replace(fc, max_horizon=new_horizon) + fc = dataclasses.replace(fc, max_horizon=new_horizon) if fc.max_context + fc.max_horizon > self.model.config.context_limit: raise ValueError( "Context + horizon must be less than the context limit." diff --git a/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py b/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py index fa57f14..c50be89 100644 --- a/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py +++ b/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py @@ -356,7 +356,7 @@ class TimesFM_2p5_200M_torch(timesfm_2p5_base.TimesFM_2p5, ModelHubMixin): self.model.o, new_horizon := math.ceil(fc.max_horizon / self.model.o) * self.model.o, ) - forecast_config = dataclasses.replace(fc, max_horizon=new_horizon) + fc = dataclasses.replace(fc, max_horizon=new_horizon) if fc.max_context + fc.max_horizon > self.model.config.context_limit: raise ValueError( "Context + horizon must be less than the context limit."