Project information
- Company: Unit8
- Project URL: github.com/unit8co/darts
- Publication: Unified Zero-Shot Time Series Forecasting: A Darts Foundation (arXiv, 2026)
- Categories: Time Series Forecasting, Foundation Models, Deep Learning, Open Source
- Main technologies: Python, PyTorch, PyTorch Lightning, NumPy
Summary
Darts is Unit8's open-source Python library for time-series forecasting, with
9.6k stars on GitHub. It puts everything from classical statistics to deep learning
and pretrained foundation models such as Chronos-2 and TimesFM behind one fit /
predict interface.
I built two features that were highlighted in the release notes: fine-tuning for foundation models, and backtesting up to 100x faster for autoregressive forecasts. I also contributed smaller features and fixes, and I am third author of the preprint presenting the library's foundation-model support.
Fine-Tuning Foundation Models
Time-series foundation models forecast series they have never seen, but a model pretrained on public data does not know a company's sales or a grid's load. In Darts they could only be used as they were, and its other PyTorch models could only be trained from scratch.
I added a single enable_finetuning parameter to every PyTorch and foundation model. Set to
True, it trains the whole network; given a pattern such as
{"unfreeze": ["output_*"]}, it trains only the matching layers and keeps the rest of the
pretrained weights frozen, which is cheaper and less likely to overfit a small dataset. Fine-tuned
models save and reload like any other Darts model, and a tutorial notebook walks through each approach.
It shipped as a headline feature of release 0.42.0.
Faster Backtesting
Before trusting a forecasting model, you replay it over history: forecast from every past point and compare with what actually happened. For its regression models (linear regression, LightGBM, XGBoost…), Darts had a fast path that forecasts all those points at once, but only when the model could cover the whole horizon in one shot. Longer horizons, where the model feeds its own predictions back in step by step, fell back to forecasting each point one after the other.
I extended the fast path to these autoregressive forecasts: each step is now computed for every point in history at once, as batched array operations. In my benchmark, backtests ran 50 to 100 times faster with identical results, and every historical forecasting scenario in Darts is now optimized (release 0.40.0).
Other Contributions
- Variable-length series for foundation models: a prototype letting short series be used for training and prediction without manual padding, which fed into the version the maintainers shipped.
- Normalization of covariates: extending reversible instance normalization from the target series to past and future covariates (in review).
- Saving naive models: fixed a crash when saving a naive baseline straight after training.