TSFast
Description
tsfastis 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,CRNNLearnerwith custom losses (nrmse,cut_loss) and composable transforms. - System Identification — Simulation, N-step prediction, FranSys,
and autoregressive models with
InferenceWrapperfor deployment. - Physics-Informed NNs — Embed governing equations into training
via
CollocationLoss,PhysicsLoss, andPIRNN, or train physics-only surrogates without measured data (DD-PINN, PINC). - Hyperparameter Optimization — Ray Tune integration via
HPOptimizer. - Deployment — Model save/load,
InferenceWrapperfor NumPy-in/NumPy-out inference, and ONNX export. - Performance — CUDA graph acceleration via
GraphedStatefulModelfor 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d82ed10dbffe4833ec8cd3d14988fc20f9c6165e6b48199df0ef62c2bad1e6c
|
|
| MD5 |
98ff514ec9014dc7403b0e21f30acc1b
|
|
| BLAKE2b-256 |
0b081744e96aa940933095d63b68cb824546c3a0c39bddb26767ac1fbbb3ad9c
|
Provenance
The following attestation bundles were made for tsfast-0.5.0.tar.gz:
Publisher:
publish.yaml on daniel-om-weber/tsfast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsfast-0.5.0.tar.gz -
Subject digest:
5d82ed10dbffe4833ec8cd3d14988fc20f9c6165e6b48199df0ef62c2bad1e6c - Sigstore transparency entry: 2274307755
- Sigstore integration time:
-
Permalink:
daniel-om-weber/tsfast@6b630175645e754dff46faec82395d0979e1cd37 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/daniel-om-weber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@6b630175645e754dff46faec82395d0979e1cd37 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bb8e40052876ebc9211bba38c999890a2c80755c124636b2c1ea8cb23c5e0c7
|
|
| MD5 |
9cfa8e60d1b641a5b4dfa262f8342822
|
|
| BLAKE2b-256 |
56f5bb54cb52556cbe2fb016b2324e13d7e106b354262dbcb8faad01c65a24e8
|
Provenance
The following attestation bundles were made for tsfast-0.5.0-py3-none-any.whl:
Publisher:
publish.yaml on daniel-om-weber/tsfast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tsfast-0.5.0-py3-none-any.whl -
Subject digest:
5bb8e40052876ebc9211bba38c999890a2c80755c124636b2c1ea8cb23c5e0c7 - Sigstore transparency entry: 2274307966
- Sigstore integration time:
-
Permalink:
daniel-om-weber/tsfast@6b630175645e754dff46faec82395d0979e1cd37 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/daniel-om-weber
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@6b630175645e754dff46faec82395d0979e1cd37 -
Trigger Event:
release
-
Statement type: