Add toto2 ensemble#349
Conversation
AzulGarza
left a comment
There was a problem hiding this comment.
thank @elmartinj! it's looking great. i left a couple of comments. also, the branch needs to be cleaned up a little bit. there are some old files in it (docs/examples/cryptocurrentcy-quickstart.ipynb) and some conflicts with main.
|
|
||
| def __init__( | ||
| self, | ||
| models: Sequence[Forecaster], |
There was a problem hiding this comment.
since we are dealing with a metalearner with a fixed set of models, it would be best to limit the set of models to the PUBLISHED_MODEL_ORDER and not allow a custom list.
| models: Sequence[Forecaster], | ||
| *, | ||
| alias: str = "Toto-2.0-FnF", | ||
| artifacts_repo: str = "Datadog/Toto-2.0-Family-and-Friends", |
There was a problem hiding this comment.
can we use repo_id to maintain consistency across the repo?
There was a problem hiding this comment.
we would like to have at least one test where the metalearner passes (not a monkey-patched test).
| artifacts_dir: str | Path | None = None, | ||
| domain: str | None = None, | ||
| term: Literal["auto", "short", "medium", "long"] = "auto", | ||
| threads: int = 4, |
There was a problem hiding this comment.
is this argument just used for tsfeatures? if that's the case, can we add it as tsfeatures_threads?
|
|
||
| The class accepts ordinary TimeCopilot forecasters, computes live forecasts | ||
| and tsfeatures from a ``unique_id, ds, y`` dataframe, and applies the | ||
| published per-(frequency, horizon-term) XGBoost gating head. | ||
|
|
||
| Model aliases must use the published names because XGBoost class indices are | ||
| tied to that order. A subset of the pool is allowed; weights are then | ||
| renormalized over the available models. |
There was a problem hiding this comment.
let's document the arguments and their default values in the docstrings.
|
Hello! Addressed the review comments:
Validation:
|
|
Updated the PR with the requested changes plus one implementation correction. Changes made:
Validation run locally:
|
Adds a general TimeCopilot implementation of the Toto 2.0 Family-and-Friends forecasting ensemble.
It runs compatible foundation-model forecasters, computes per-series tsfeatures, applies the published frequency and horizon-specific XGBoost gating model, and returns forecasts using the standard TimeCopilot output conventions.
Changes
Added unit tests for:
Notes
The published FnF ensemble uses a fixed ten-model order. Existing compatible TimeCopilot forecasters can be supplied using their published aliases.
The current TimeCopilot Toto wrapper targets Toto 1.0. A separate Toto 2.0 wrapper will be needed to reproduce the complete published ten-model pool.