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 with layer normalization, and combined 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.
  • 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.4.0.tar.gz (17.2 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.4.0-py3-none-any.whl (250.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tsfast-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d9d2ad2343626309188777197b72cb650760e5e518ba78e1272f90f110eeec8c
MD5 136d955b44563fe15d4207b1a0ee4f2a
BLAKE2b-256 24115859c1c84288754915de5354563e2827fdb32e2ca674587a51e706f5211c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.4.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: tsfast-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 250.2 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f93232f45bb612dc3f80286950811604cc388da5951daa2df178c9d70d9a5fc5
MD5 88a10b4d98c5f96860b25cc1403eceef
BLAKE2b-256 fd552c88fc40bc48eee3cc12b8d180bb91a3a343f92ff41b36c76f3e4dfda049

See more details on using hashes here.

Provenance

The following attestation bundles were made for tsfast-0.4.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

0.5.0

2 files

This release

0.4.0 This release

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