Skip to content

Fix TimesFM 2.5 window_size AttributeError - #47363

Merged
vasqu merged 4 commits into
huggingface:mainfrom
kashif:fix-timesfm2_5-window-size
Jul 16, 2026
Merged

Fix TimesFM 2.5 window_size AttributeError#47363
vasqu merged 4 commits into
huggingface:mainfrom
kashif:fix-timesfm2_5-window-size

Conversation

@kashif

@kashif kashif commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

CI

Passing window_size to TimesFm2_5ModelForPrediction crashed because forward called self._timesfm_moving_average, but the modular converter renames the static method to _timesfm2_5_moving_average. Fixed the call site to match.

Fixes #46821

Repro from the issue now runs fine:

model(past_values=forecast_input_tensor, window_size=5)

@kashif
kashif requested a review from vasqu July 16, 2026 07:56

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we add a fast test but modular got us good :D

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: timesfm2_5

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution 🤗!

CI Security Gate — automatic approval blocked

This PR was not automatically approved for CI because the security gate failed.

Possible reasons:

  • The PR touches 50 or more files — only PRs with fewer than 50 changed files are automatically approved
  • A changed file is outside the allowed directories (src/, tests/, docs/, utils/), has a disallowed extension (only .py, .txt, .md permitted outside tests/ and docs/), or is not .md/.yml inside docs/
  • A new high-severity security issue was detected in the changed Python files (Bandit check)

See the workflow run for the exact violations.

A maintainer can review and manually approve CI if a finding is a false positive.

@vasqu
vasqu enabled auto-merge July 16, 2026 13:21
@vasqu
vasqu added this pull request to the merge queue Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 29501487908:1
Result: success | Jobs: 2 | Tests: 10 | Failures: 0 | Duration: 40s

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Merged via the queue into huggingface:main with commit 5fbd5f0 Jul 16, 2026
35 of 36 checks passed
@kashif
kashif deleted the fix-timesfm2_5-window-size branch July 16, 2026 16:57
stevhliu pushed a commit to stevhliu/transformers that referenced this pull request Jul 30, 2026
* fix timesfm2.5 window_size crash from wrong method name

* add fast test for window_size
Sainava pushed a commit to Sainava/Sai-transformers that referenced this pull request Aug 3, 2026
* fix timesfm2.5 window_size crash from wrong method name

* add fast test for window_size
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.

[TimesFM 2.5]:window_size argument raises AttributeError

3 participants