Skip to content

feat: add timesfm-3 model - #12

Merged
AzulGarza merged 8 commits into
mainfrom
feat/timesfm-3
Sep 7, 2026
Merged

feat: add timesfm-3 model#12
AzulGarza merged 8 commits into
mainfrom
feat/timesfm-3

Conversation

@AzulGarza

Copy link
Copy Markdown
Member

this pr adds the new timesfm version to the model hub

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

The TimesFM public docstring currently implies a kwargs dict parameter, but the factory API actually forwards extra keywords via **kwargs, which is likely to mislead users and cause misconfiguration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the FoundationForecast TimesFM integration to support the new TimesFM 3.0 PyTorch checkpoint, including dependency bumps, implementation routing, tests, and documentation updates around model availability and licensing.

Changes:

  • Bump timecopilot-timesfm dependency to >=0.4.0 (and refresh lockfiles).
  • Add a new _TimesFMV3 implementation and route google/timesfm-3.0-pytorch through TimesFM(...).
  • Extend tests and experiment configs/docs to include TimesFM 3.0 and note its non-commercial weights license.
File summaries
File Description
uv.lock Updates lockfile entries for timecopilot-timesfm 0.4.0 artifacts.
pyproject.toml Bumps timecopilot-timesfm minimum version to >=0.4.0.
foundationforecast/models/timesfm.py Implements _TimesFMV3 and routes repo_id containing 3.0 to it; updates TimesFM docstring.
tests/models/test_timesfm.py Adds routing test for google/timesfm-3.0-pytorch and includes _TimesFMV3 in parametrized checks.
tests/models/conftest.py Adds a TimesFM 3.0 instance to the model test matrix.
README.md Documents TimesFM 3.0 availability and clarifies its non-commercial license.
docs/model-hub.md Updates model hub to state TimesFM supports 1.0/2.0/2.5/3.0 and notes 3.0 licensing.
experiments/gift-eval/uv.lock Updates experiment lockfile for timecopilot-timesfm 0.4.0 artifacts.
experiments/gift-eval/configs/models.yaml Adds a GIFT-Eval model entry for TimesFM 3.0.
experiments/gift-eval/configs/ci_subset.yaml Adds TimesFM 3.0 to the CI subset job list.
Review details
  • Files reviewed: 8/10 changed files
  • Comments generated: 1
  • 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 thread foundationforecast/models/timesfm.py Outdated

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

The new TimesFM 3.0 backend adds substantial new forecast logic but lacks a lightweight unit test exercising the _TimesFMV3.forecast path, and there’s also a small maintainability cleanup needed.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

foundationforecast/models/timesfm.py:257

  • _TimesFMV3._get_predictor takes prediction_length but never uses it, which is confusing given the other TimesFM backends do use it to configure max horizon. If it is intentionally unused for TimesFM3, explicitly mark it as such to avoid future maintainers thinking it was accidentally omitted.
  • Files reviewed: 8/11 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines +32 to +37
def test_timesfm_routes_3_0_repo():
model = TimesFM(repo_id="google/timesfm-3.0-pytorch")
assert isinstance(model, _TimesFMV3)
assert model.repo_id == "google/timesfm-3.0-pytorch"


@AzulGarza
AzulGarza merged commit 7cea02b into main Sep 7, 2026
16 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