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 TrainingRNNLearner, 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}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsfast-0.5.0.tar.gz (17.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsfast-0.5.0-py3-none-any.whl (327.1 kB view details)

Uploaded Python 3

File details

Details for the file tsfast-0.5.0.tar.gz.

File metadata

  • Download URL: tsfast-0.5.0.tar.gz
  • Upload date:
  • Size: 17.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tsfast-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5d82ed10dbffe4833ec8cd3d14988fc20f9c6165e6b48199df0ef62c2bad1e6c
MD5 98ff514ec9014dc7403b0e21f30acc1b
BLAKE2b-256 0b081744e96aa940933095d63b68cb824546c3a0c39bddb26767ac1fbbb3ad9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.5.0.tar.gz:

Publisher: publish.yaml on daniel-om-weber/tsfast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tsfast-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: tsfast-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 327.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tsfast-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bb8e40052876ebc9211bba38c999890a2c80755c124636b2c1ea8cb23c5e0c7
MD5 9cfa8e60d1b641a5b4dfa262f8342822
BLAKE2b-256 56f5bb54cb52556cbe2fb016b2324e13d7e106b354262dbcb8faad01c65a24e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.5.0-py3-none-any.whl:

Publisher: publish.yaml on daniel-om-weber/tsfast

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

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