From be91ef8ee32e4c94c4484e8bb31f2a5c96a24adc Mon Sep 17 00:00:00 2001 From: Rajat Sen Date: Thu, 30 Oct 2025 20:11:16 +0000 Subject: [PATCH] manually download config.json --- src/timesfm/timesfm_2p5/timesfm_2p5_torch.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py b/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py index c50be89..558e7db 100644 --- a/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py +++ b/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py @@ -55,10 +55,12 @@ class TimesFM_2p5_200M_torch_module(nn.Module): # Layers. self.tokenizer = dense.ResidualBlock(self.config.tokenizer) - self.stacked_xf = nn.ModuleList([ - transformer.Transformer(self.config.stacked_transformers.transformer) - for _ in range(self.x) - ]) + self.stacked_xf = nn.ModuleList( + [ + transformer.Transformer(self.config.stacked_transformers.transformer) + for _ in range(self.x) + ] + ) self.output_projection_point = dense.ResidualBlock( self.config.output_projection_point ) @@ -287,6 +289,13 @@ class TimesFM_2p5_200M_torch(timesfm_2p5_base.TimesFM_2p5, ModelHubMixin): """ # Create an instance of the model wrapper class. instance = cls(**model_kwargs) + # Download the config file for hf tracking. + _ = hf_hub_download( + repo_id="google/timesfm-2.5-200m-pytorch", + filename="config.json", + force_download=True, + ) + print("Downloaded.") # Determine the path to the model weights. model_file_path = ""