skforecast/skforecast-ai/foundation-forecasting
- community
Checking that the SKILL.md file is still in the repository.
Forecasts time series zero-shot with pre-trained foundation models (Amazon Chronos-2, Google TimesFM 2.5/3.0, Salesforce Moirai-2, Soda-INRIA TabICL, Prior Labs TabPFN-TS, The Forecasting Company T0, EDF Lab TS-ICL, Synthefy Nori) via ForecasterFoundation and FoundationModel. Covers single and multi-series workflows, exogenous variables, prediction intervals / quantiles, backtesting, and inference-time parameter search (context_length tuning). Use when the user wants accurate forecasts without task-specific training, forecasts for short or new (cold-start) series, or pre-trained generalist models.
Install
npx vskill@latest install skforecast/skforecast-ai/foundation-forecastingSKILL.md
The same SKILL.md was published earlier as skforecast/skforecast/foundation-forecasting.
Foundation Model Forecasting (Zero-Shot)
When to Use
Use ForecasterFoundation when:
- You want accurate forecasts without training a model. The best pre-trained models are among the top performers in public benchmarks (GIFT-Eval, fev-bench).
- You have very short histories where ML models struggle.
- You need to forecast cold-start series (new product, new sensor).
- You have many heterogeneous series (different lengths, exogenous variables or missing values).
Trade-offs: prediction needs more computing resources (usually a GPU), and a forecaster trained on the user's data with well-designed features and exogenous variables can still be more accurate for a specific problem. Compare them with backtesting on the same folds.
Foundation models are pre-trained on massive corpora — fit() does not train them; it only stores the recent context and metadata.
Related skills
- Prerequisite:
choosing-a-forecaster(decide whether a zero-shot model fits the problem at all) - Alongside:
baseline-forecasting(compare the zero-shot model against a naive rule with MASE) - Next:
hyperparameter-optimization(tunecontext_lengthwithbayesian_search_foundation) - Next:
metric-selection(probabilistic metrics for the native quantile output)
Stop Conditions
Scan before writing code. Each row lists a rule, the symptom when it is broken, and the recovery. Full pitfall catalog: the troubleshooting-common-errors skill.
| Rule | Symptom | Recovery | |
|---|---|---|---|
fit() stores context only; it never trains the model | Expecting training to happen or weights to update | Treat the model as pre-trained; evaluate with backtesting_foundation | |
cv.refit and cv.fixed_train_size are overridden by backtesting_foundation | IgnoredArgumentWarning when refit=True or fixed_train_size=False | Leave them at their defaults; the context window expands per fold either way | |
Only Chronos-2, TimesFM 3.0, TabICL, TabPFN-TS, T0, Nori, and TS-ICL use exog; TimesFM 2.5 and Moirai-2 ignore it | IgnoredArgumentWarning, forecast made without exog | Pick an exog-capable adapter when covariates matter | |
TimesFM (2.5 and 3.0) and Moirai-2 restrict quantiles to [0.1, 0.2, ..., 0.9] | Requested quantile rejected or unsupported | Request only supported quantiles, or use an adapter allowing any quantile in (0, 1) | |
| Each backend library must be installed separately | ModuleNotFoundError / ImportError on first use | pip install the matching backend (see Installation) | |
Tuning uses bayesian_search_foundation, never bayesian_search_forecaster* | TypeError on the forecaster type or on OneStepAheadFold | Call bayesian_search_foundation with a TimeSeriesFold | |
| Weights for TimesFM 3.0, Moirai-2, TabPFN-TS, and TS-ICL are released under known non-commercial licenses (terms vary, e.g. TabPFN-TS allows commercial use under an enterprise license); no warning does not mean a model is unrestricted | LicenseWarning on first model load | Review the linked license before commercial use; suppress the warning with suppress_warnings=True if already reviewed |
Installation
Foundation model backends are not bundled with skforecast. Install only the backend(s) you need:
Models are downloaded from HuggingFace on first use.
Quick Start (single series)
Multi-Series (Global Zero-Shot Model)
Pass a wide DataFrame, a long-format DataFrame (MultiIndex), or a dict[str, pd.Series] to fit.
The series do not need to be aligned: they can have different lengths and time spans, a different subset of exog columns each, and NaN values. Each series is forecast from its own context and horizon, so no padding or imputation is required before fit. See the user guide Foundation models with heterogeneous series for the per-backend rules.
Chronos-2 supports cross_learning=True to share information across series in the batch (ignored in single-series mode):
With Exogenous Variables (Chronos-2, TimesFM 3.0, TabICL, TabPFN-TS, TFC-T0, Nori, and TS-ICL)
Chronos-2, TimesFM 3.0, TabICL, TabPFN-TS, TFC-T0, Nori, and TS-ICL (allow_exog=True) accept exogenous variables. TimesFM 2.5 and Moirai-2 ignore them. At predict time the future exog columns are validated per series against the historical exog: a future column with no history raises ValueError; a historical column with no future values is a past-only covariate, used by Chronos-2, TS-ICL and TimesFM 3.0 (supports_past_only_covariates=True) and ignored with an IgnoredArgumentWarning by TabICL, TabPFN-TS, TFC-T0 and Nori. Series in a multi-series input may differ in length and in their exog columns: each series is forecast with its own columns, and adapters whose backend needs identical columns per batch (supports_heterogeneous_covariates=False: Chronos-2, TS-ICL, TabICL, TimesFM 3.0) are called once per group of series sharing the same columns, so the forecast of a series never depends on the exog of the others.
Prediction Intervals and Quantiles
Foundation models output native quantile forecasts — no bootstrapping or conformal calibration is required.
For TimesFM (2.5 and 3.0) and Moirai-2, requested quantiles must be a subset of [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]. TS-ICL accepts any level on a finer 0.01 grid in [0.01, 0.99] (e.g. 0.05, 0.37); off-grid levels raise a ValueError. Chronos-2, TabICL, TabPFN-TS, TFC-T0 and Nori support any quantile in (0, 1).
Choosing a Model
Model (model_id prefix) | Exog | Default context | Best for | |
|---|---|---|---|---|
autogluon/chronos-2-* (Amazon) | Yes | 8192 | General-purpose, exog-friendly, cross-series info | |
google/timesfm-2.5-* (Google) | No | 512 | Long-horizon point/quantile forecasts | |
google/timesfm-3.0-* (Google) | Yes | 2048 | Long-horizon point/quantile forecasts, exog-aware | |
Salesforce/moirai-2.0-* (Salesforce) | No | 2048 | Multivariate pretraining, probabilistic forecasts | |
soda-inria/tabicl (Soda-INRIA) | Yes | 4096 | Tabular in-context learning, exog-aware | |
priorlabs/tabpfn-ts (Prior Labs) | Yes | 32768 | Tabular foundation model, exog-aware, long context | |
theforecastingcompany/t0 (TFC) | Yes | 8192 | Probabilistic forecasts, exog-aware (future covariates) | |
Synthefy/Nori (Synthefy) | Yes | 4096 | Tabular foundation model, exog-aware | |
taharnbl/TS-ICL (EDF Lab) | Yes | 4096 | Past & future covariates, fine-grained (0.01) quantile grid |
The adapter is resolved automatically from the model_id prefix — no need to import adapter classes directly.
To check what a model supports before installing its backend or loading its weights, use get_model_info (one model_id) or list_adapters (one entry per adapter, or a DataFrame with as_frame=True). Both return a frozen FoundationModelInfo read from the adapter classes, so it always matches the installed skforecast version; prefer it over hard-coding the table above.
TimesFM 3.0, Moirai-2, TabPFN-TS, and TS-ICL weights are released under known non-commercial licenses; loading them raises a LicenseWarning naming the license and a link to the model card. Terms vary by provider (e.g. TabPFN-TS permits commercial use under an enterprise license), so review the linked license rather than the warning text alone. A model id not covered by this warning is not confirmed to be unrestricted.
Backtesting
Use the dedicated backtesting_foundation function — it is the only backtester that accepts a ForecasterFoundation. Internally cv is deep-copied and forced to refit=True, fixed_train_size=False, so the context window expands with each fold up to context_length; no weights are ever trained. Probabilistic output is requested via quantiles, not interval.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskforecast_ai/skills/foundation-forecasting/SKILL.md
Popularity
- Repository stars
- 50
- Repository forks
- 6
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/skforecast/skforecast-ai/foundation-forecasting)