Skip to content

test(gift-eval): CI replication for Granite PatchTST-FM r2 and TiRex-2 zeroshot - #28

Merged
AzulGarza merged 9 commits into
mainfrom
feat/gift-eval-ci-patchtst-r2-tirex2-zs
Sep 18, 2026
Merged

AzulGarza merged 9 commits into
mainfrom
feat/gift-eval-ci-patchtst-r2-tirex2-zs

Conversation

@AzulGarza

Copy link
Copy Markdown
Member

Summary

  • Register ibm-granite--granite-timeseries-patchtst-fm-r2 in models.yaml for GIFT-Eval replication
  • Swap CI subset jobs: TiRex 1.1 → TiRex-2 GIFT-Eval zeroshot, PatchTST r1 → Granite PatchTST-FM r2
  • Update gift-eval README to reflect the new CI models

Test plan

  • CI test-gift-eval runs 11 Modal jobs on m4_weekly/short
  • pytest tests/test_replication.py passes after S3 sync
  • PatchTST r2 metrics match HF reference (may need batch_size tuning on first run)

Made with Cursor

…2 zeroshot

Swap ci_subset jobs from TiRex 1.1 and PatchTST r1 to the newer GIFT-Eval
checkpoints and register Granite PatchTST-FM r2 in models.yaml.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codspeed

codspeed Bot commented Sep 17, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 30.27%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 6 improved benchmarks
✅ 11 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation test_process_panel_from_df[large] 104.4 ms 77.2 ms +35.26%
Simulation test_timeseries_dataset_from_df[large] 107.5 ms 80.3 ms +33.87%
Simulation test_process_panel_from_df_string_ds 225.2 ms 168.2 ms +33.86%
Simulation test_foundation_forecast_multi_model[3-models] 145.6 ms 112.1 ms +29.89%
Simulation test_foundation_forecast_multi_model[5-models] 174.1 ms 136.2 ms +27.84%
Simulation test_seasonal_naive_forecast 78.3 ms 64.5 ms +21.39%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feat/gift-eval-ci-patchtst-r2-tirex2-zs (8a3773e) with main (b42a613)

Open in CodSpeed

AzulGarza and others added 7 commits September 17, 2026 17:09
r2 uses overlapping patches (n_patch=1023, patch_stride=8) which requires
granite-tsfm>=0.3.9; timecopilot-granite-tsfm 0.2.1 only supports the r1
reshape path and fails with shape [32, 1023, 16] vs 262144.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sort uv.lock files for pre-commit and register Granite PatchTST-FM r2 in
tests/models/conftest.py alongside the existing r1 entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add changelog entry, model hub/README checkpoint notes, PatchTSTFM docstrings,
and gift-eval models.yaml config test for the new r2 checkpoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map inferred aliases like h, 6h, 15min, and MS to strings accepted by
granite-tsfm get_fixed_factor before computing the FlowState scale factor.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ving r1

Keep existing TiRex 1.1 and PatchTST-FM r1 jobs and add the new checkpoints
alongside them (13 Modal jobs total).

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Correct the CI swaps and align the CI count and dependency documentation.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds Granite PatchTST-FM r2 support, updates dependencies and FlowState frequency handling, and expands GIFT-Eval CI configuration.

Changes:

  • Registers and documents Granite PatchTST-FM r2.
  • Updates Granite dependencies and lockfiles.
  • Adds FlowState normalization tests and CI model entries.
File summaries
File Summary
uv.lock Updates resolved dependencies.
tests/models/test_flowstate.py Tests frequency normalization.
tests/models/conftest.py Adds model coverage.
README.md Updates model and licensing documentation.
pyproject.toml Updates Granite dependency.
foundationforecast/models/patchtst_fm.py Documents r2 support.
foundationforecast/models/flowstate.py Normalizes frequency aliases.
experiments/gift-eval/uv.lock Updates experiment dependencies.
experiments/gift-eval/tests/test_models_config.py Tests model registration.
experiments/gift-eval/README.md Documents CI coverage.
experiments/gift-eval/configs/models.yaml Registers Granite r2.
experiments/gift-eval/configs/ci_subset.yaml Updates CI model jobs.
docs/model-hub.md Documents supported models.
docs/changelogs/v0.1.8.md Records the changes.
Review details

Suppressed comments (2)

experiments/gift-eval/configs/ci_subset.yaml:36

  • This adds the r2 job while retaining the existing PatchTST-FM r1 entry at lines 31–33, so the stated r1 → r2 swap is not implemented and the CI subset contains an extra job. Replace the old r1 block with this r2 block (or update the intended matrix/count consistently).
  - model_key: ibm-granite--granite-timeseries-patchtst-fm-r2
    dataset_name: m4_weekly
    term: short

pyproject.toml:51

  • Switching the dependency to the public granite-tsfm package leaves the repository's contributor documentation inaccurate: docs/contributing.md:91 still labels Granite TSFM as the forked timecopilot-granite-tsfm package. Please update that documentation in the same change so new contributors do not install or publish the obsolete dependency.
  "granite-tsfm>=0.3.9 ; python_full_version >= '3.11' and python_full_version < '3.14'",
  • Files reviewed: 12/14 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 16 to +21
- model_key: NX-AI--TiRex-1.1-gifteval
dataset_name: m4_weekly
term: short
- model_key: NX-AI--TiRex-2-gifteval-zs
dataset_name: m4_weekly
term: short
## CI subset

[`configs/ci_subset.yaml`](configs/ci_subset.yaml) defines **10 jobs**: Chronos on
[`configs/ci_subset.yaml`](configs/ci_subset.yaml) defines **13 jobs**: Chronos on
Remove obsolete timecopilot-granite-tsfm fork reference and clarify that
ci_subset adds new models without removing TiRex 1.1 or PatchTST-FM r1.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Remove the superseded CI entries and correct the documented job count.

Review details

Suppressed comments (4)

experiments/gift-eval/README.md:47

  • The subset currently contains 12 jobs (2 Chronos + 10 weekly jobs), not 13 as documented here. This count will remain incorrect even after the old TiRex/PatchTST entries are removed unless the intended target is clarified; update the count to match the actual YAML.
[`configs/ci_subset.yaml`](configs/ci_subset.yaml) defines **13 jobs**: Chronos on

experiments/gift-eval/configs/ci_subset.yaml:22

  • The PR description says these CI entries should be swapped out and the test plan expects 11 jobs, but retaining NX-AI--TiRex-1.1-gifteval here leaves both TiRex versions enabled; together with the other unchanged entries this makes the subset 13 jobs. Remove the old TiRex entry if the intended CI subset is the one described.
  - model_key: NX-AI--TiRex-2-gifteval-zs
    dataset_name: m4_weekly
    term: short

experiments/gift-eval/configs/ci_subset.yaml:37

  • The PR description says PatchTST-FM r1 should be replaced by r2 and the test plan expects 11 jobs, but this adds r2 without removing ibm-research--patchtst-fm-r1, producing the documented 13-job subset instead. Remove the old r1 entry if this is meant to be a swap rather than an expansion.
  - model_key: ibm-granite--granite-timeseries-patchtst-fm-r2
    dataset_name: m4_weekly
    term: short

experiments/gift-eval/configs/ci_subset.yaml:22

  • This adds the TiRex-2 job without replacing the TiRex 1.1 entry, and the same happens for PatchTST r2 versus r1 below. As a result the subset runs 12 jobs (not the 11 stated in the PR description), adds rather than swaps the requested models, and increases CI cost; remove the two old entries if the intended change is the documented swap.
  - model_key: NX-AI--TiRex-2-gifteval-zs
    dataset_name: m4_weekly
    term: short
  • Files reviewed: 13/15 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@AzulGarza
AzulGarza merged commit b0bb897 into main Sep 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants