Skip to content

feat: reuse shared panel processing across forecasters (refresh of #2) - #18

Open
elmartinj wants to merge 3 commits into
mainfrom
feat/improve-speed-refresh
Open

feat: reuse shared panel processing across forecasters (refresh of #2)#18
elmartinj wants to merge 3 commits into
mainfrom
feat/improve-speed-refresh

Conversation

@elmartinj

Copy link
Copy Markdown
Collaborator

This is a refreshed version of #2 (feat: use common syntaxis and improve speed), rebased onto current main. The original commits by Azul are preserved on this branch; the final commit fixes what was blocking the old PR.

What's in it:

  • Preprocess the input DataFrame once into a shared PanelData and reuse it across model calls instead of every wrapper re-doing sorting, datetime conversion, and dataset construction.
  • Thread the optional panel through the base Forecaster.forecast signature and MultiModelForecasterMixin.forecast, and update every built-in model wrapper (including Tafsut and TimesFM 3.0, which landed on main after the original PR).
  • Fix the test failures from feat: use common syntaxis and improve speed #2's last CI run: quantile columns are now assigned one at a time because utilsforecast.assign_columns rejects list values for multiple columns.
  • Compute the Chronos panel once so dataset construction and finetuning inputs share it.
  • Remove redundant _ = panel statements in the TimesFM 1.0 / 2.5 paths.

Local verification: pre-commit (ruff, ruff-format, mypy, toml-sort) passes and the download-free test suite passes (78 passed, 6 skipped). Full model tests still need a CI run.

Related: #2

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ AzulGarza
❌ elmartinj


elmartinj seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Rebase of the feat/improve-speed branch onto main surfaced several issues:

- assign quantile columns one at a time: utilsforecast only supports
  single-column assignment for list values
- accept a precomputed panel in the base Forecaster, Tafsut, and
  TimesFM 3.0 forecast paths
- thread the optional panel argument through MultiModelForecasterMixin
  so custom models can opt in without breaking the type contract
- compute the Chronos panel once and reuse it for dataset and finetuning
- drop redundant panel assignments in TimesFM 1.0 / 2.5
- normalize string ds columns to datetime when building shared panels,
  matching the existing dataset behavior and the README quick example
- add a download-free regression test for quantile-column assignment
@elmartinj
elmartinj force-pushed the feat/improve-speed-refresh branch from 44c69f1 to a8deacb Compare September 7, 2026 22:47
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.

3 participants