Scripts2026年7月26日·1 分钟阅读

Time-Series-Library — Advanced Deep Learning Models for Time Series

A comprehensive library of state-of-the-art deep learning models for time series analysis including forecasting, classification, imputation, and anomaly detection.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Time-Series-Library Overview
直接安装命令
npx -y tokrepo@latest install 75340a43-890f-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Time-Series-Library (TSLib) is an open-source Python library from Tsinghua University that provides a unified codebase for advanced deep learning models applied to time series tasks. It enables researchers and practitioners to benchmark and deploy models for forecasting, classification, imputation, and anomaly detection using a consistent interface.

What Time-Series-Library Does

  • Implements 15+ state-of-the-art deep time series models (TimesNet, PatchTST, iTransformer, DLinear, and more)
  • Supports four core tasks: long-term forecasting, short-term forecasting, imputation, and anomaly detection
  • Provides standardized experiment scripts for reproducible benchmarking
  • Includes popular time series datasets with unified data loading pipelines
  • Offers configurable training with GPU acceleration via PyTorch

Architecture Overview

TSLib follows a modular design with separate layers for data loading, model definition, training, and evaluation. Each model implements a common interface, allowing users to switch between architectures by changing a single configuration parameter. The training loop handles multi-GPU setups and supports early stopping, learning rate scheduling, and checkpoint saving.

Self-Hosting & Configuration

  • Clone the repo and install dependencies via pip install -r requirements.txt
  • Configure experiments through command-line arguments or shell scripts in the scripts/ directory
  • Set --model to choose from available architectures (TimesNet, PatchTST, DLinear, FEDformer, etc.)
  • Adjust --seq_len, --pred_len, and --label_len to control input/output horizons
  • Place custom datasets in the dataset/ folder following the provided CSV format

Key Features

  • Unified codebase covering multiple time series tasks under one framework
  • Reproducible baselines with pre-configured experiment scripts
  • Supports Transformer-based, MLP-based, and CNN-based model families
  • Active maintenance with new models added as they are published
  • Clean PyTorch implementation suitable for extension and research

Comparison with Similar Tools

  • Darts — Higher-level API with statistical and ML models; TSLib focuses on deep learning research
  • sktime — Scikit-learn-compatible framework for classical ML; TSLib targets neural architectures
  • GluonTS — AWS probabilistic forecasting library; TSLib provides a broader model zoo
  • NeuralForecast — Nixtla's neural forecasting; TSLib emphasizes multi-task support beyond forecasting

FAQ

Q: What Python and PyTorch versions are required? A: Python 3.8+ and PyTorch 1.8+ are recommended. Check requirements.txt for exact dependencies.

Q: Can I add my own model to TSLib? A: Yes. Implement the Model class interface in the models/ directory and register it in the experiment runner.

Q: Does it support multivariate time series? A: Yes. Most models support both univariate and multivariate settings via the --features flag (S, M, or MS).

Q: Is GPU training supported? A: Yes. Use --use_gpu and --gpu flags to select devices, with multi-GPU support available.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产