Neural forecasting with the plumbing already handled
It wraps benchmark-winning architectures in a PyTorch Lightning API so you can train interpretable forecasters on pandas DataFrames without writing the usual boilerplate.
What it does
PyTorch Forecasting is a deep-learning time series library that sits on top of PyTorch Lightning. You feed it pandas DataFrames, and its TimeSeriesDataSet class handles the tedious preprocessing—variable transformations, missing values, randomized subsampling, and multiple history lengths—before passing data to a suite of built-in models. It trains Temporal Fusion Transformers, N-BEATS, N-HiTS, DeepAR, and simpler baselines on CPU or GPU with TensorBoard logging and multi-horizon metrics included.
The interesting bit
The library treats architecture as largely inferred from your dataset metadata, so you tweak a handful of hyperparameters instead of hand-assembling encoders and decoders. The models come with built-in interpretation capabilities—actual-vs-prediction and dependency plots are standard—and the package integrates Optuna for hyperparameter tuning, a convenience that usually ends up as DIY glue code.
Key highlights
- Bundles several benchmark-winning architectures: TFT, N-BEATS, N-HiTS, DeepAR, plus LSTM/GRU/MLP baselines.
- Claims TFT outperforms DeepAR by 36–69% in benchmarks; N-BEATS ensemble won the M4 competition.
TimeSeriesDataSetabstracts pandas DataFrame wrangling, including missing values and multiple history lengths.- Runs on CPU, single GPU, or multiple GPUs out of the box via PyTorch Lightning.
- Includes built-in visualizations and Optuna-based hyperparameter tuning.
Verdict
Reach for this if you want modern neural forecasters without writing your own Lightning modules or data pipelines. Look elsewhere if you need classical statistical baselines or a bare-metal framework for novel architectures—though it does offer tutorials for custom models.
Frequently asked
- What is sktime/pytorch-forecasting?
- It wraps benchmark-winning architectures in a PyTorch Lightning API so you can train interpretable forecasters on pandas DataFrames without writing the usual boilerplate.
- Is pytorch-forecasting open source?
- Yes — sktime/pytorch-forecasting is open source, released under the MIT license.
- What language is pytorch-forecasting written in?
- sktime/pytorch-forecasting is primarily written in Python.
- How popular is pytorch-forecasting?
- sktime/pytorch-forecasting has 5k stars on GitHub.
- Where can I find pytorch-forecasting?
- sktime/pytorch-forecasting is on GitHub at https://github.com/sktime/pytorch-forecasting.