
Time-Series-Library
A code library of deep learning models for forecasting, filling gaps, spotting anomalies and classifying time
- Stars
- 13k
- Forks
- 2k
- Licence
- MIT
- Language
- Python
- Last update
- 7 months ago
- Type
- Library
What it is
TSLib is a Python code library from the THUML group that collects many deep learning models for time series data, such as sequences of sensor readings or prices over time. It provides a shared codebase to run and compare these models on five tasks: long- and short-term forecasting, imputation (filling in missing values), anomaly detection, and classification. Researchers use it to benchmark existing models or to build and test their own.
- Run a built-in model such as TimesNet or PatchTST on a long-term forecasting task
- Evaluate a zero-shot forecasting script for large time series models, as added in 2025
- Test a forecasting model that uses exogenous variables via the TimeXer implementation
- Add your own model file and compare it against the included baselines
Great for
- Deep learning researchers comparing time series models on common tasks
- Developers who want reference implementations of models like TimesNet, iTransformer, or PatchTST
- Students learning deep time series analysis, helped by the TimesNet tutorial in the README
- Teams prototyping a custom time series model within a shared experiment setup
Not ideal for
- People who need a ready-made production forecasting service, since the README frames it as a research codebase
- Anyone expecting new features: the README says the maintainers will not actively add new features in 2026
- Users who want current state-of-the-art benchmarks, since the README says many older benchmarks may no longer be meaningful
How to get it
- 1
Clone and build from source
You'll need: Python · pip · Docker (optional, the README mentions a docker deployment)
Clone the repository
git clone https://github.com/thuml/Time-Series-Library.git - 2
Run it
- Clone the repository and open the project folder
- Install the dependencies listed in the requirements file or use the Docker setup described in the README
- Pick a script from the scripts folder, such as the long-term forecasting ETT scripts
- Run the script and review the results it produces
- Open the TimesNet tutorial notebook for a guided walkthrough
- 3
Get the most out of it
- Use the zero-shot forecasting script to evaluate large time series models
- Read the TimeMixer paper's advice on look-back length before comparing forecasting results
- Install mamba_ssm with pip if you want to use the Mamba model
- Check the TimeXer and iTransformer entries to explore forecasting with exogenous variables
Downloads
Strengths
- Covers five common time series tasks in one codebase
- Includes implementations of many published models with links to their papers
- Maintained by a research lab and widely starred, with a tutorial for beginners
Trade-offs
- The README says active feature development has stopped and benchmarks may be outdated
- Some models need extra setup, such as installing mamba_ssm for the Mamba model
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| Time-Series-Library (this) | 13k | Library | intermediate | 7 months ago | Deep learning researchers comparing time series models on common tasks |
| faster-whisper | 26.4k | Library | intermediate | 6 days ago | Python developers who need to add speech-to-text to an application |
| pytorch_geometric | 24.1k | Library | intermediate | 15 days ago | Researchers who want ready-made implementations of published graph neural network methods |
| albumentations | 15.3k | Library | beginner | 1.4 years ago | Machine learning engineers training image classification or segmentation models with limited data |
| imgaug | 14.7k | Library | intermediate | 2.3 years ago | Machine learning engineers training image models on a limited dataset |
| wandb | 11.3k | Library | beginner | 4 days ago | Machine learning engineers who want to compare training runs over time |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.