MCPcopy Index your code
hub / github.com/GestaltCogTeam/BasicTS

github.com/GestaltCogTeam/BasicTS @v1.1.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.1.0 ↗
915 symbols 3,344 edges 282 files 549 documented · 60%
README


A Fair and Scalable Time Series Analysis Benchmark and Toolkit.

English | 简体中文


EasyTorch LICENSE PyTorch PyTorch python lint

🎉 Getting Started | 💡 Overall Design

📦 Dataset | 🛠️ Scaler | 🧠 Model | 📉 Metrics | 🏃‍♂️ Runner | 📜 Config | 📜 Baselines

BasicTS (Basic Time Series) is a benchmark library and toolkit designed for time series analysis. It now supports a wide range of tasks and datasets such as spatial-temporal forecasting, long-term time series forecasting, classification, and imputation. It covers various types of algorithms such as statistical models, machine learning models, and deep learning models, making it an ideal tool for developing and evaluating time series analysis models. You can find detailed tutorials in Getting Started.

📢 Latest Updates

🎉 Update (Oct 2025): BasicTS now has built-in support for Selective Learning (NeurIPS'25), an effective training strategy to mitigate overfitting and enhance model performance and generalization. Users can import and use it directly from the callback module. Usage Guide

🎉 Update (Oct 2025): BasicTS version 1.0 is released! New Features: - 🚀 Quick Start with Three Lines of Code: Install via pip, minimal API design for rapid model training and evaluation. - 📦 Modular Components, Ready to Use: Provides plug-and-play components like Transformers and MLPs, allowing you to build your own model like building blocks. - 🔄 Multi-Task Support: Natively supports core tasks in time series analysis, including forecasting, classification, and imputation. - 🔧 Highly Extensible Architecture: Based on Taskflow and Callback mechanisms, enabling easy customization without modifying the Runner.

🎉 Update (May 2025): BasicTS now supports training universal forecasting models (e.g., TimeMoE and ChronosBolt) using the BLAST (KDD'25) corpus. BLAST enables faster convergence, significantly reduced computational costs, and achieves superior performance even with limited resources.

If you find this project helpful, please don't forget to give it a ⭐ Star to show your support. Thank you!

[!IMPORTANT] If you find this repository helpful for your work, please consider citing the following benchmarking paper:

LaTeX @article{shao2024exploring, title={Exploring progress in multivariate time series forecasting: Comprehensive benchmarking and heterogeneity analysis}, author={Shao, Zezhi and Wang, Fei and Xu, Yongjun and Wei, Wei and Yu, Chengqing and Zhang, Zhao and Yao, Di and Sun, Tao and Jin, Guangyin and Cao, Xin and others}, journal={IEEE Transactions on Knowledge and Data Engineering}, year={2024}, volume={37}, number={1}, pages={291-305}, publisher={IEEE} }

🔥🔥🔥 The paper has been accepted by IEEE TKDE! You can check it out here. 🔥🔥🔥

✨ Highlighted Features

On one hand, BasicTS provides a unified and standardized pipeline, offering a fair and comprehensive platform for reproducing and comparing popular models.

On the other hand, BasicTS offers a user-friendly and easily extensible interface, enabling quick design and evaluation of new models. Users can simply define their model structure and easily perform basic operations.

Fair Performance Review

Users can compare the performance of different models on arbitrary datasets fairly and exhaustively based on a unified and comprehensive pipeline.

Developing with BasicTS

Minimum Code

Users only need to implement key codes such as model architecture and data pre/post-processing to build their own deep learning projects.

Everything Based on Config

Users can control all the details of the pipeline through a config file, such as the hyperparameter of dataloaders, optimization, and other tricks (e.g., curriculum learning).

Support All Devices

BasicTS supports CPU, GPU and GPU distributed training (both single node multiple GPUs and multiple nodes) thanks to using EasyTorch as the backend. Users can use it by setting parameters without modifying any code.

Save Training Log

Support logging log system and Tensorboard, and encapsulate it as a unified interface, users can save customized training logs by calling simple interfaces.

🚀 Installation and Quick Start

For detailed instructions, please refer to the Getting Started tutorial.

📦 Supported Baselines

BasicTS implements a wealth of models, including classic models, spatial-temporal forecasting models, and long-term time series forecasting model, and universal forecasting models.

You can find the implementation of these models in the baselines directory.

The code links (💻Code) in the table below point to the official implementations from these papers. Many thanks to the authors for open-sourcing their work!

Universal Forecasting Models

📊Baseline 📝Title 📄Paper 💻Code 🏛Venue 🎯Task
TimeMoE Time-MoE: Billion-Scale Time Series Foundation Models with Mixture of Experts Link Link ICLR'25 UFM
ChronosBolt Chronos: Learning the Language of Time Series Link Link TMLR'24 UFM
MOIRAI (inference) Unified Training of Universal Time Series Forecasting Transformers Link Link ICML'24 UFM

Spatial-Temporal Forecasting

📊Baseline 📝Title 📄Paper 💻Code 🏛Venue 🎯Task
STDN Spatiotemporal-aware Trend-Seasonality Decomposition Network for Traffic Flow Forecasting Link Link AAAI'25 STF
HimNet Heterogeneity-Informed Meta-Parameter Learning for Spatiotemporal Time Series Forecasting Link Link SIGKDD'24 STF
DFDGCN Dynamic Frequency Domain Graph Convolutional Network for Traffic Forecasting Link Link ICASSP'24 STF
STPGNN Spatio-Temporal Pivotal Graph Neural Networks for Traffic Flow Forecasting Link Link AAAI'24 STF
BigST Linear Complexity Spatio-Temporal Graph Neural Network for Traffic Forecasting on Large-Scale Road Networks Link Link VLDB'24 STF
STDMAE Spatio-Temporal-Decoupled Masked Pre-training for Traffic Forecasting Link Link IJCAI'24 STF
STWave When Spatio-Temporal Meet Wavelets: Disentangled Traffic Forecasting via Efficient Spectral Graph Attention Networks Link Link ICDE'23 STF
STAEformer Spatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traffic Forecasting Link Link CIKM'23 STF
MegaCRN Spatio-Temporal Meta-Graph Learning for Traffic Forecasting Link Link AAAI'23 STF
DGCRN Dynamic Graph Convolutional Recurrent Network for Traffic Prediction: Benchmark and Solution Link Link ACM TKDD'23 STF
STID Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting Link Link CIKM'22 STF
STEP Pretraining Enhanced Spatial-temporal Graph Neural Network for Multivariate Time Series Forecasting Link Link SIGKDD'22 STF
D2STGNN Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting Link Link

Core symbols most depended-on inside this repo

save
called by 152
src/basicts/configs/base_config.py
launch_training
called by 26
src/basicts/launcher.py
trigger
called by 14
src/basicts/runners/callback/callback.py
build_layer
called by 13
src/basicts/modules/transformer/utils.py
register_meter
called by 13
src/basicts/runners/basicts_runner.py
update_meter
called by 13
src/basicts/runners/basicts_runner.py
_shape
called by 7
src/basicts/modules/transformer/attentions/auto_correlation.py
ffn_forward
called by 6
src/basicts/modules/transformer/encoder.py

Shape

Method 498
Function 215
Class 201
Route 1

Languages

Python100%

Modules by API surface

src/basicts/runners/basicts_runner.py47 symbols
src/basicts/modules/transformer/decoder.py23 symbols
src/basicts/modules/embed/tst_embed.py19 symbols
src/basicts/models/Koopa/arch/layers.py19 symbols
src/basicts/runners/callback/callback.py17 symbols
src/basicts/models/TimeKAN/arch/timekan_layers.py17 symbols
src/basicts/models/StemGNN/arch/stemgnn_arch.py15 symbols
src/basicts/models/DUET/arch/linear_extractor_cluster.py15 symbols
src/basicts/models/Crossformer/arch/crossformer_layers.py15 symbols
src/basicts/data/blast.py14 symbols
src/basicts/models/MTSMixer/arch/mtsmixer_layers.py13 symbols
src/basicts/configs/base_config.py13 symbols

Dependencies from manifests, versioned

easy-torch1.3.3 · 1×
easydict
numpy1.24.4 · 1×
openpyxl
packaging
setproctitle
setuptools59.5.0 · 1×
tables
tensorboard2.18.0 · 1×

For agents

$ claude mcp add BasicTS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact