feat: use foundationforecast library - #368
Open
AzulGarza wants to merge 3 commits into
Open
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. |
Contributor
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this pr abstracts foundation models and uses
foundationforecastinstead.