tsai: a fastai-style deep learning library for time series, and where it stops being the right tool
Time series Timeseries Deep Learning Machine Learning Python Pytorch fastai | State-of-the-art Deep Learning library for Time Series and Sequences in Pytorch / fastai
At a glance
- What is it?
- tsai wraps PyTorch and fastai around time series classification, regression, forecasting and imputation, shipping a large catalogue of published architectures plus downloaders for standard benchmark datasets. It is best suited to engineers who already know fastai and want published models without reimplementing them.
- Who is it for?
- Adopt tsai if your team already writes fastai training loops and you want published time series architectures and benchmark datasets without rebuilding them from papers. Do not adopt it if you need a framework-agnostic model zoo, a stable long-term API, or a conda-managed environment, since the conda channel is no longer updated as of 1.0.0.
- 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 54 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The gap tsai fills between a paper and a training loop
Time series papers publish architectures faster than practitioners can reimplement them. InceptionTime, Rocket, MiniRocket, TST, TSiT, gMLP, XCM, OmniScale and mWDN each arrive with a reference implementation that assumes a different data layout, a different normalisation convention and a different evaluation harness. tsai's answer is to place those models behind a shared interface built on PyTorch and fastai, so that swapping InceptionTime for MiniRocket does not mean rewriting your dataloaders. The README lists the models with links to their source files and the original papers, which makes the catalogue auditable: you can check the year and the paper before trusting a name. The audience is narrow and specific. If you have never used fastai's Learner abstraction, tsai's value proposition shrinks considerably, because a large part of what it saves you is fastai boilerplate. If you have, the saving is real. The library also targets four task families rather than one: classification, regression, forecasting and imputation, plus self-supervised work, which is unusual for a package in this space. Most alternatives pick classification and stop.
What the repository layout tells you about the design
The README is explicit that the file is autogenerated and must not be edited, which points at a notebook-driven build. The primary language listed for the repository is Jupyter Notebook, and the model list links into a nbs directory. That is the nbdev pattern: source lives in notebooks, and the Python modules under tsai/models are generated from them. The practical consequence is that the models are organised one file per architecture family, with RNN.py covering LSTM and GRU, RNN_FCN.py covering LSTM-FCN, GRU-FCN and MLSTM-FCN, and separate modules for InceptionTime, ROCKET, MINIROCKET, TCN, XceptionTime, ResCNN, OmniScaleCNN, TST, TSiTPlus, TabTransformer, gMLP, XCM and mWDN. If you want to patch a model, you edit the notebook and regenerate rather than editing the module directly, because the module carries the autogenerated warning. The README also mentions sklearn-type pipeline transforms and walk-forward cross validation as recent additions. Walk-forward validation matters for forecasting specifically, because random k-fold splits leak future information into the training set, and a library that ships the correct splitter by default removes a common and quiet source of inflated scores. The README states that reduced RAM requirements were part of the same release cycle, though it gives no figures, so treat that as a direction of travel rather than a measured claim.
Installation, the Python 3.10 floor, and what pip does not bring
The README gives a plain pip install tsai for the latest stable release from PyPI. For an editable install it gives git clone of the repository followed by pip install -e "tsai[dev]". The extras split is the part worth reading carefully. tsai installs only hard dependencies by default, and the README states that optional dependencies (sktime, tsfresh, PyWavelets, nbformat) are needed only for selected tasks, with the library prompting you to install them when required. If you would rather not be interrupted mid-run, pip install tsai[extras] pulls everything up front. The version constraint is hard: Python 3.10 or newer, because support for 3.9 was dropped in 1.0.0. That is a real migration cost if you are pinned to an older interpreter for reasons outside your control. The conda story has changed too. As of 1.0.0 the conda channel is no longer updated and tsai is distributed via PyPI only, though older releases remain on the timeseriesai conda channel. Teams with conda-only build pipelines need to either add pip into the environment or stay on a pre-1.0 release and accept the older API. The README points at the CHANGELOG for full upgrade notes when coming from 0.x, which is the document to read before bumping a working 0.4.x installation, since 0.4.1 to 1.0.0 is a major version step.
Dataset downloaders and why the bundled benchmarks matter
The README lists the datasets available for download through tsai: 128 univariate classification datasets, 30 multivariate classification datasets, 15 regression datasets, 62 forecasting datasets and 9 long term forecasting datasets. These are the standard benchmark collections that the published papers in the model list were evaluated on, which means you can reproduce a paper's setup without hunting for the right train/test split. That is worth more than it sounds. A large share of time series results are hard to compare because the split protocol differs between implementations, and a library that ships both the model and the canonical dataset removes one degree of freedom. The forecasting counts are also a signal about where the project's recent effort has gone: 62 general forecasting datasets plus 9 long term forecasting datasets is a heavier commitment than the classification side would require, and the README separately mentions a PatchTST tutorial for long term forecasting. If your problem is classification, you benefit from the downloaders but not from the forecasting investment. If your problem is long-horizon forecasting, the dataset breadth and the PatchTST material are the parts to look at first.
Where tsai is the wrong tool
The first limitation is the documentation surface. The homepage is a documentation link and the README is a catalogue with an installation block; the README itself says additional tutorials on data preparation and forecasting are planned rather than published. Data preparation is exactly the step where time series projects fail, and it is the step with the thinnest written guidance here. Second, the API is not frozen. The jump from 0.x to 1.0.0 dropped Python 3.9, ended conda distribution and changed the default dependency set. A library that moves that much between minor and major releases will move again, so pinning matters. Third, the dependency footprint is not small: PyTorch plus fastai plus, for some tasks, sktime, tsfresh and PyWavelets. In a constrained deployment environment, that is a lot of surface to audit. Fourth, if your series are short, tabular, and well described by lagged features plus gradient boosting, a deep learning library is the wrong layer entirely, and tsai's own TabModel and TabTransformer modules exist precisely because some time series problems are better framed as tabular ones. Fifth, the repository is notebook-first. If your team's review process does not handle .ipynb diffs, contributing a model back is more friction than contributing a .py file.
How tsai differs from sktime
The most direct comparison is sktime, which is also named in tsai's optional dependency list. The difference in approach is structural. sktime builds on the scikit-learn estimator interface, so a classifier is a fit and predict object that composes with scikit-learn pipelines and grid search. tsai builds on fastai, so training is expressed through a Learner with a dataloader, a loss, a metric and a fit call, and the models are neural networks. That gives tsai access to architectures sktime does not carry, and it gives sktime access to the classical and statistical methods tsai does not carry. The practical split: if your winning approach is likely to be a neural network, and you want the published deep architectures with their benchmark datasets, tsai is the closer fit. If you need to compare a neural model against exponential smoothing, a shapelet transform or a dictionary method inside one pipeline and one cross-validation harness, sktime's estimator abstraction is the one that composes. The two are not mutually exclusive, and tsai's own optional dependency on sktime suggests the authors see them as complementary rather than competing.
Maintenance cost, licensing and what to check before you commit
tsai is Apache-2.0 licensed, which permits commercial use and modification provided the licence and attribution notices are preserved, and it includes a patent grant. That is a permissive choice and it removes the most common legal blocker for internal deployment. It is not legal advice, and if you are redistributing a modified build you should have counsel read the notice requirements against your distribution model. On maintenance, the pattern visible in the release history is long quiet periods broken by large jumps: 0.4.1 in July 2025, then 1.0.0 and 1.0.1 in May 2026. The repository is not archived and the last push is recent, so the project is alive, but the cadence means you should not expect a quick patch for a bug that affects you. Budget for reading the CHANGELOG at each upgrade rather than assuming a drop-in. The concrete checks worth running before you adopt: confirm your interpreter is 3.10 or newer, decide between pip install tsai and pip install tsai[extras] based on whether your task needs sktime, tsfresh, PyWavelets or nbformat, and open the model module for the architecture you intend to use to confirm the class name is unchanged from whatever tutorial you are following. The README's model list links each entry to its file, so that check takes a minute and saves an afternoon.
Editorial conclusion
Adopt tsai if your team already writes fastai training loops and you want published time series architectures and benchmark datasets without rebuilding them from papers. Do not adopt it if you need a framework-agnostic model zoo, a stable long-term API, or a conda-managed environment, since the conda channel is no longer updated as of 1.0.0. Before committing, verify three things: that your interpreter is Python 3.10 or newer, that the specific model class you need still exists under the same name in the 1.0.1 source tree, and whether your task pulls in optional dependencies such as sktime, tsfresh or PyWavelets that pip will not install by default.
Community notes