Uh oh!
There was an error while loading. Please reload this page.
feat: use foundationforecast library - #368
Conversation
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. |
There was a problem hiding this comment.
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
foundationforecastcounterparts. - Switch
TimeCopilotForecasterto usefoundationforecast.core.multi_model.MultiModelForecasterMixinfor 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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
this pr abstracts foundation models and uses
foundationforecastinstead.