TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
Python
manually download config.json
Rajat Senbe91ef8ee32e
diff --git a/src/timesfm/timesfm_2p5/timesfm_2p5_torch.py b/src/timesfm/timesfm_2p5/timesfm_2p5_torch.pyindex 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 = ""