[Doc/Bug] Outdated API signature and parameter structure in TimesFM 3.0 covariate example (demo_covariates.py)
Author: en-aydeaCreated Sep 10, 2026Updated Sep 10, 2026
Hi timesfm team,
The example script demo_covariates.py located at timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py in the TimesFM 3.0 release relies on legacy TimesFM 2.5 method signatures and incorrect parameter structures that do not match the TimesFM 3.0 API. Specific Discrepancy In demonstrate_api() (lines 266–283), the script showcases the following code snippet:
# Current snippet in demo_covariates.py (TimesFM 3.0 repo)
point_fc, quant_fc = model.forecast_with_covariates(
inputs=[sales_a, sales_b, sales_c],
dynamic_numerical_covariates={"price": [price_a, price_b, price_c]},
dynamic_categorical_covariates={"holiday": [hol_a, hol_b, hol_c]},
static_categorical_covariates={"store_type": ["premium","standard","discount"]},
xreg_mode="xreg + timesfm",
normalize_xreg_target_per_input=True,
)
Key Issues:
- Invalid Parameter Structure & Names: The covariate parameters (dynamic_numerical_covariates, dynamic_categorical_covariates, static_categorical_covariates) are passed as dictionary mappings, which does not align with the v3.0 API parameter definitions.
- Legacy Function Call: model.forecast_with_covariates() is a legacy v2.5 function.
- Outdated Checkpoint & Metadata: The script explicitly initializes google/timesfm-2.5-200m-pytorch and prints TIMESFM COVARIATES API (TimesFM 2.5) inside the 3.0.0 release package.
Location: timesfm-forecasting/examples/covariates-forecasting/demo_covariates.py
Source: google-research/timesfm