Swap InceptionTime for PatchTST without copy-pasting arXiv code
tsai corrals two dozen time series architectures—PatchTST, ROCKET, InceptionTime, and others—into a single fastai-friendly package so you can benchmark classifiers, regressors, and forecasters without reimplementing half a decade of papers.
What it does
tsai is a PyTorch and fastai library that bundles implementations of deep learning models for time series classification, regression, forecasting, and imputation. It provides normalized access to architectures like PatchTST, TST, InceptionTime, and MiniROCKET, along with 244 built-in datasets and tutorial notebooks. The library supports univariate and multivariate inputs, single- and multi-step forecasting, and includes utilities such as sklearn-type pipeline transforms and walk-forward cross-validation.
The interesting bit
Rather than scattering model code across disconnected repositories, tsai normalizes everything under fastai’s Learner API, so switching from InceptionTimePlus to PatchTST is largely a matter of changing one argument. It also folds non-deep methods like ROCKET into the same workflow, even though they rely on a different backend and optional dependencies.
Key highlights
- Bundles 20+ architectures, from LSTM (1997) to ICLR 2023’s PatchTST, plus attention-based RNNs and tabular transformers.
- Ships with 244 built-in datasets spanning classification, regression, and forecasting, plus tutorial notebooks.
- Includes sklearn-type pipelines, walk-forward cross-validation, and reduced RAM requirements for forecasting workflows.
- Python 3.10+ is required; PyTorch 2.0 is supported, and conda builds stopped at v1.0.0, leaving PyPI as the only distribution channel.
Caveats
- Tightly coupled to fastai: if you don’t buy into its
Learnerand callback ecosystem, you’ll be fighting the current. - The ROCKET family needs optional dependencies (sktime) and follows a different usage pattern than the deep learning models.
- The README is autogenerated and the project is under active development, so expect API drift between releases.
Verdict Reach for tsai if you want to rapidly benchmark modern time series architectures or teach a course with ready-made datasets and consistent training loops. Skip it if you prefer vanilla PyTorch or need a lightweight, framework-agnostic toolkit.
Frequently asked
- What is timeseriesAI/tsai?
- tsai corrals two dozen time series architectures—PatchTST, ROCKET, InceptionTime, and others—into a single fastai-friendly package so you can benchmark classifiers, regressors, and forecasters without reimplementing half a decade of papers.
- Is tsai open source?
- Yes — timeseriesAI/tsai is open source, released under the Apache-2.0 license.
- What language is tsai written in?
- timeseriesAI/tsai is primarily written in Jupyter Notebook.
- How popular is tsai?
- timeseriesAI/tsai has 6.1k stars on GitHub.
- Where can I find tsai?
- timeseriesAI/tsai is on GitHub at https://github.com/timeseriesAI/tsai.