Skip to main content
tsfast logo

TSFast

PyPI version License: Apache 2.0 Python Versions

Description

tsfast is an open-source deep learning library for time series analysis and system identification tasks. Built on PyTorch, it offers efficient deep learning models and utilities.

tsfast is an open-source deep learning package that focuses on system identification and time series analysis tasks. Built on PyTorch, it provides efficient implementations of various deep learning models and utilities.

Key Features

  • Specialized Data Handling — HDF5-backed data pipeline with sequence transforms, noise injection, normalization, and TBPTT (Truncated Backpropagation Through Time) support.
  • Benchmark Datasets — One-line access to Silverbox, Wiener-Hammerstein, Cascaded Tanks, and more via identibench.
  • Time Series Models — RNNs (DenseNet, Residual), TCNs, CRNNs, transformers, NARX, state-space models (NeuralStateSpace, S5, LRU, Mamba), dynoNet, port-Hamiltonian networks (PHNN), and certified-by-construction REN/R2DN models, with fused Triton/C++ kernels for the recurrent architectures.
  • Integrated Training — RNNLearner, TCNLearner, CRNNLearner with custom losses (nrmse, cut_loss) and composable transforms.
  • System Identification — Simulation, N-step prediction, FranSys, and autoregressive models with InferenceWrapper for deployment.
  • Physics-Informed NNs — Embed governing equations into training via CollocationLoss, PhysicsLoss, and PIRNN, or train physics-only surrogates without measured data (DD-PINN, PINC).
  • Hyperparameter Optimization — Ray Tune integration via HPOptimizer.
  • Deployment — Model save/load, InferenceWrapper for NumPy-in/NumPy-out inference, and ONNX export.
  • Performance — CUDA graph acceleration via GraphedStatefulModel for low-overhead GPU training.

Installation

You can install the latest stable version using:

pip install tsfast

For development installation:

git clone https://github.com/daniel-om-weber/tsfast
cd tsfast
pip install -e '.[dev]'
# or using uv:
uv sync --extra dev

Quick Start

Here is a quick example using a benchmark dataloader. It demonstrates loading and visualizing data, training a RNN, and visualizing the results.

from tsfast.basics import *

# Load benchmark dataset
dls = create_dls_silverbox()

# Train an RNN and visualize results
lrn = RNNLearner(dls)
lrn.fit_flat_cos(1)
lrn.show_results(max_n=1)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Citation

If you use tsfast in your research, please cite:

@Misc{tsfast,
author = {Daniel O.M. Weber},
title = {tsfast - A deep learning library for time series analysis and system identification},
howpublished = {Github},
year = {2024},
url = {https://github.com/daniel-om-weber/tsfast}
}

Metadata

Release files for tsfast 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tsfast 0.5.0
File Size Uploaded Provenance Actions
tsfast-0.5.0.tar.gz 17.4 MB With provenance Details for tsfast-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tsfast 0.5.0
File Interpreter ABI Platform Actions
tsfast-0.5.0-py3-none-any.whl Python 3 none any Details for tsfast-0.5.0-py3-none-any.whl

Total release size: 17.7 MB

Release files / tsfast-0.5.0.tar.gz

Download URL tsfast-0.5.0.tar.gz
Size 17.4 MB
Tags Source
SHA-256 checksum
How to use checksums
5d82ed10dbffe4833ec8cd3d14988fc20f9c6165e6b48199df0ef62c2bad1e6c
BLAKE2b-256 checksum
How to use checksums
0b081744e96aa940933095d63b68cb824546c3a0c39bddb26767ac1fbbb3ad9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / tsfast-0.5.0-py3-none-any.whl

Download URL tsfast-0.5.0-py3-none-any.whl
Size 327.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bb8e40052876ebc9211bba38c999890a2c80755c124636b2c1ea8cb23c5e0c7
BLAKE2b-256 checksum
How to use checksums
56f5bb54cb52556cbe2fb016b2324e13d7e106b354262dbcb8faad01c65a24e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Security for tsfast 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tsfast-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page