pytorch-forecasting
Forecasting timeseries with PyTorch - dataloaders, normalizers, metrics and models
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and provides a well-structured abstraction over multiple state-of-the-art forecasting architectures. Install it if you need to train neural forecasting models on time series data and want to avoid reimplementing standard architectures or training boilerplate. The MIT license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires torch to be installed; on Windows, install torch separately via pip install torch -f https://download.pytorch.org/whl/torch_stable.html before installing pytorch-forecasting.
- Low friction installation as a pure Python wheel.
- Depends on torch, lightning, and standard scientific stack (numpy, scipy, pandas, scikit-learn, scikit-base).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) allows commercial and private use with minimal restrictions.
last release 2026-06-24 (51 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 344,304 downloads/mo, #7,375 on PyPI
Alternatives
Verify before relying
pip install pytorch-forecasting
from pytorch_forecasting import TimeSeriesDataSet, TemporalFusionTransformer
import lightning.pytorch as pl
training = TimeSeriesDataSet(
data,
time_idx="time_column",
target="target_column",
group_ids=["series_id"],
max_encoder_length=36,
max_prediction_length=6
)
model = TemporalFusionTransformer.from_dataset(training)
trainer = pl.Trainer(max_epochs=10)
trainer.fit(model, train_dataloaders=training.to_dataloader(train=True))- Whether the package's GPU/multi-GPU training scales efficiently in production environments
- Performance characteristics and memory requirements for large-scale time series datasets
- Availability and completeness of hyperparameter tuning integration with optuna
What it is and what it does
PyTorch Forecasting is a high-level library for building and training deep learning time series forecasting models. It abstracts away boilerplate around data handling (variable transformations, missing values, subsampling), model training, and evaluation, while providing several state-of-the-art neural architectures out of the box. The library leverages lightning to handle training on CPUs and GPUs transparently, with automatic logging and visualization.
You use it by converting your pandas DataFrame into a TimeSeriesDataSet, choosing a model architecture (Temporal Fusion Transformer, N-BEATS, N-HiTS, DeepAR, or simpler baselines like LSTM), and training via the Lightning Trainer. It includes multi-horizon metrics, interpretation capabilities, and optional hyperparameter tuning. The package targets both practitioners seeking reasonable defaults and researchers needing flexibility to implement custom architectures.
Use it for
- Train a Temporal Fusion Transformer on multivariate time series data with both static and time-varying covariates for interpretable multi-step forecasting.
- Benchmark multiple architectures (N-BEATS, N-HiTS, DeepAR, LSTM) on your dataset to compare forecasting accuracy without reimplementing each model.
- Automatically scale training across multiple GPUs using lightning without modifying model code.
- Build a probabilistic forecasting pipeline with DeepAR to generate prediction intervals alongside point forecasts.
- Perform hyperparameter tuning with optuna integration to optimize model performance on your specific time series problem.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and provides a well-structured abstraction over multiple state-of-the-art forecasting architectures. Install it if you need to train neural forecasting models on time series data and want to avoid reimplementing standard architectures or training boilerplate. The MIT license poses no restrictions.
Install
pytorch-forecasting on PyPI
Before you install
Low friction installation as a pure Python wheel. Depends on torch, lightning, and standard scientific stack (numpy, scipy, pandas, scikit-learn, scikit-base). Last release 51 days ago with active maintenance status.
Requires torch to be installed; on Windows, install torch separately via pip install torch -f https://download.pytorch.org/whl/torch_stable.html before installing pytorch-forecasting.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install pytorch-forecasting
from pytorch_forecasting import TimeSeriesDataSet, TemporalFusionTransformer
import lightning.pytorch as pl
training = TimeSeriesDataSet(
data,
time_idx="time_column",
target="target_column",
group_ids=["series_id"],
max_encoder_length=36,
max_prediction_length=6
)
model = TemporalFusionTransformer.from_dataset(training)
trainer = pl.Trainer(max_epochs=10)
trainer.fit(model, train_dataloaders=training.to_dataloader(train=True))
Verify before relying
- Whether the package's GPU/multi-GPU training scales efficiently in production environments
- Performance characteristics and memory requirements for large-scale time series datasets
- Availability and completeness of hyperparameter tuning integration with optuna
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesnumpytorchlightningscipypandasscikit-learnscikit-base |
| Maintenance | Actively maintained 51 days since the last release |
| First released | |
| Downloads | 344,304 / month, #7,375 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: pytorch_forecasting-1.8.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “temporal fusion transformer”
- pytorch-forecastingPyTorch Forecasting provides neural network models and utilities for…
- transformer-engineTransformer Engine accelerates Transformer model training and…
- transformer-engine-cu12Accelerates Transformer model training and inference on NVIDIA GPUs…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also neuralforecast · gluonts · darts · neuralprophet · torchsr · pytorch-ignite · lightning · u8darts · chronos-forecasting · tbats