Library / SDK
awslabs/gluonts avatar
awslabs/gluonts

GluonTS: probabilistic time series forecasting in PyTorch

Probabilistic time series modeling in Python

5,245 stars839 forksPythonApache-2.0

At a glance

What is it?
GluonTS is Amazon's Python library for probabilistic time series modeling, focused on deep learning models on PyTorch with forecasts expressed as distributions. It installs with a torch extra on Python 3.10 to 3.14, and its maintainers have also released Chronos for zero-shot forecasting.
Who is it for?
Use GluonTS when your forecasts need to be distributions rather than point values, your modeling stack is PyTorch, and your interpreter is Python 3.10 to 3.14. Prefer a classical statistics library when short series and ARIMA-style models are enough, and look at Chronos, from the same group, when you want zero-shot predictions without training at all.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 61 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Forecasts as distributions, models as PyTorch

GluonTS is a Python package for probabilistic time series modeling, with its attention on deep learning based models built on PyTorch. The probabilistic part is the identity: output arrives as a distribution, and the README's example chart shades 50% and 90% prediction intervals around the forecast path, so a planning downstream consumer sees risk, not just a line. Development happens under Amazon's awslabs organization, with a [email protected] contact in pyproject.toml. The same group has also released Chronos, a suite of pretrained models for zero-shot forecasting on series never seen in training, in a separate amazon-science repository; GluonTS remains the train-it-yourself half of that work. Peers exist in the same space: darts is another Python library whose model zoo spans classical and neural forecasters, while GluonTS stays on the probabilistic deep learning side.

The torch extra is where PyTorch arrives

Supported Python runs 3.10 to 3.14, and the recommended installation path goes through uv:

bash
uv pip install "gluonts[torch]"

Plain pip works the same way:

bash
pip install "gluonts[torch]"

The bracket matters more than the installer. Base dependencies are numpy, pandas, pydantic, tqdm, toolz and typing-extensions, with numpy pinned per interpreter generation (>=1.24 on Python 3.12 and newer, >=1.16 below), and no deep learning framework among them. PyTorch support comes from the torch extra, so an install without brackets is an install without models. Development setup is a clone plus uv sync --all-extras, and further installation options are documented at ts.gluon.ai under getting_started/install.html.

DeepAR on twelve years of airline passengers

The worked example in the README trains DeepAR on the airpassengers dataset, a single monthly series of passenger counts from 1949 to 1960, fitting on the first nine years and forecasting the remaining three. Imports come from three corners of the package:

py
from gluonts.dataset.pandas import PandasDataset
from gluonts.dataset.split import split
from gluonts.torch import DeepAREstimator

A pandas DataFrame becomes a dataset by naming its target column, and the split is done by offset:

py
df = pd.read_csv(
    "https://raw.githubusercontent.com/AileenNielsen/"
    "TimeSeriesAnalysisWithPython/master/data/AirPassengers.csv",
    index_col=0,
    parse_dates=True,
)
dataset = PandasDataset(df, target="#Passengers")

# Split the data for training and testing
training_data, test_gen = split(dataset, offset=-36)

offset=-36 hands the final 36 months, three years, to the test generator. What comes back out is the shaded-interval forecast described above, which is the visual argument for probabilistic modeling in one picture.

dev is the default branch, and 0.18.0.dev0 is the version

Repository habits lean academic. The default branch is named dev, not main, and the version string in pyproject.toml is 0.18.0.dev0, a development number sitting one step past the newest tag, v0.17.0, which was released on 2026-07-31 alongside a release candidate on 2026-07-22 and v0.16.3 on 2026-06-29. The last push came on 2026-07-31 as well, the release day itself. Development ergonomics include a Justfile and a dev_setup.sh script at the root, alongside the usual CONTRIBUTING.md and CODE_OF_CONDUCT.md. For anyone pinning versions, the practical consequence is that the default checkout is pre-release by construction, and stability means asking for a tag.

A pygments theme registered in pyproject.toml

Small fingerprints say something about a project's relationship with its own documentation. GluonTS registers a custom syntax highlighting style, gluonts-dark from gluonts.meta.style:Dark, as a pygments entry point, so the package ships a look for its code blocks along with the models. Optional dependency groups reinforce the impression: an arrow extra adds pyarrow for columnar data, and a docs extra pulls ipython, ipykernel, nbconvert, nbsphinx and notedown, the toolkit of documentation built from notebooks. A NOTICE file sits next to the Apache-2.0 LICENSE, the standard accompaniment for AWS open source releases, and keywords in pyproject.toml read time series, forecasting, machine learning, deep learning and probabilistic forecasting.

Notebooks from M4 benchmarks to COVID forecasts

The examples directory is a tour of real forecasting exercises: benchmark_m4.py for the M4 competition data, COV19-forecast.ipynb for pandemic-era forecasting, m5_gluonts_template.ipynb for the M5 competition, and iTransformer.ipynb for a newer architecture. Supporting scripts cover the workflow around the models: evaluate_model.py for scoring, persist_model.py for saving fitted estimators, warm_start.py for resuming training, anomaly_detection.py for the obvious, and spliced binned pareto demos in both notebook and script form. A GluonTS_SageMaker_SDK_Tutorial.ipynb ties the library to AWS's managed training, with dockerfiles alongside. The tutorial lineage runs deep: sessions at IJCAI 2021, WWW 2020, SIGMOD 2019, KDD 2019 and VLDB 2018, several with recorded video, plus an ISF 2020 deep learning workshop.

A JMLR paper you are asked to cite

Research provenance is formal here. The README asks scientific users to cite a Journal of Machine Learning Research article from 2020, volume 21, number 116, titled GluonTS: Probabilistic and Neural Time Series Modeling in Python, alongside an earlier 2019 arXiv preprint, arXiv:1906.05264, and model-specific references where relevant. A REFERENCES.md file in the repository collects papers from the group behind the library into one bibliography. That posture explains the shape of the project: estimators are named after published architectures, benchmarks reference competition datasets, and the boundary between library and research artifact stays deliberately thin. For engineering teams it means the code you import has a paper trail, and for upgrading it means changelogs and papers together are the release notes.

Editorial conclusion

Use GluonTS when your forecasts need to be distributions rather than point values, your modeling stack is PyTorch, and your interpreter is Python 3.10 to 3.14. Prefer a classical statistics library when short series and ARIMA-style models are enough, and look at Chronos, from the same group, when you want zero-shot predictions without training at all. Verify first that the [torch] extra is part of your install command, because the base package pulls in no deep learning framework by itself.

Frequently asked questions

What is GluonTS?

GluonTS is a Python package for probabilistic time series modeling, focused on deep learning models built on PyTorch. It is developed under Amazon's awslabs organization and publishes forecasts as probability distributions with 50% and 90% prediction intervals.

How do I install GluonTS?

Run uv pip install "gluonts[torch]" or pip install "gluonts[torch]", on Python 3.10 to 3.14. The torch extra brings PyTorch support, and further installation options are documented at ts.gluon.ai.

Does GluonTS include DeepAR?

Yes. The README's worked example trains a DeepAR model using DeepAREstimator from gluonts.torch on the airpassengers dataset, fitting on the first nine years of monthly data and forecasting the remaining three.

Official sources

  1. awslabs/gluonts on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/awslabs-gluonts.svg)](https://hysenlabs.com/projects/awslabs-gluonts)