Skip to content

feat: use foundationforecast library - #368

Open
AzulGarza wants to merge 3 commits into
mainfrom
feat/use-foundation-forecast
Open

feat: use foundationforecast library#368
AzulGarza wants to merge 3 commits into
mainfrom
feat/use-foundation-forecast

Conversation

@AzulGarza

Copy link
Copy Markdown
Member

this pr abstracts foundation models and uses foundationforecast instead.

Copilot AI lite review requested due to automatic review settings August 13, 2026 20:23
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates TimeCopilot’s foundation-model integrations to the external foundationforecast library, keeping timecopilot.models.foundation.* as lightweight shims for backward compatibility while updating the unified forecaster to reuse shared multi-model orchestration.

Changes:

  • Replace in-repo foundation model implementations with shim classes that inherit from foundationforecast counterparts.
  • Switch TimeCopilotForecaster to use foundationforecast.core.multi_model.MultiModelForecasterMixin for multi-model orchestration.
  • Update dependencies, docs, and tests to reflect the new foundationforecast-based architecture.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
uv.lock Adds foundationforecast and updates locked transitive dependencies.
timecopilot/models/utils/forecaster.py Re-exports core forecaster utilities/types from foundationforecast.
timecopilot/models/prophet.py Adds anomaly-series-length override hook for Prophet.
timecopilot/models/foundation/utils.py Removes local TimeSeriesDataset implementation (migrated to foundationforecast).
timecopilot/models/foundation/toto.py Converts Toto to a foundationforecast shim.
timecopilot/models/foundation/tirex.py Converts TiRex to a foundationforecast shim.
timecopilot/models/foundation/timesfm.py Converts TimesFM to a foundationforecast shim.
timecopilot/models/foundation/timegpt.py Converts TimeGPT (+ finetuning config) to foundationforecast imports/shim.
timecopilot/models/foundation/tabpfn.py Converts TabPFN to a foundationforecast shim.
timecopilot/models/foundation/t0.py Converts T0 to a foundationforecast shim.
timecopilot/models/foundation/sundial.py Converts Sundial to a foundationforecast shim.
timecopilot/models/foundation/patchtst_fm.py Converts PatchTST-FM to a foundationforecast shim.
timecopilot/models/foundation/moirai.py Converts Moirai to a foundationforecast shim.
timecopilot/models/foundation/flowstate.py Converts FlowState to a foundationforecast shim.
timecopilot/models/foundation/chronos.py Converts Chronos (+ finetuning config) to foundationforecast imports/shim.
timecopilot/models/foundation/init.py Updates public exports and python-version gated imports for foundation models.
timecopilot/forecaster.py Adopts MultiModelForecasterMixin for forecast/CV/anomaly routing.
tests/test_forecaster.py Adjusts cache-cleaning monkeypatching to match new orchestration behavior.
tests/models/foundation/test_utils.py Updates dataset import to foundationforecast.core.utils.TimeSeriesDataset.
tests/models/foundation/test_shims.py Adds coverage asserting shim classes remain Forecaster subclasses and expose core methods.
pyproject.toml Replaces many per-model dependencies with foundationforecast>=0.1.1.
mkdocs.yml Preloads foundationforecast for docs generation.
docs/model-hub.md Documents that foundation implementations live in foundationforecast and are re-exported by TimeCopilot.

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

Comment thread timecopilot/models/foundation/tirex.py
Comment thread timecopilot/models/foundation/chronos.py
Comment thread timecopilot/models/foundation/timesfm.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 25 changed files in this pull request and generated no new comments.

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