Sandbox
@Ladbaby/PyOmniTS

Time series framework for models, datasets, and losses

PyOmniTS gives you a common training setup for many time series models so you can swap models, datasets, and loss functions without changing the core training code. It is built around shared experiment code in `exp/`, model definitions in `models/`, supporting layers in `layers/`, and dataset providers in `data/`. The repository is aimed at benchmarking and reproduction work, especially for irregular time series as well as forecasting and classification. It also ships per-model scripts and documentation so you can run existing setups or adapt them for new papers.

98 stars15 forksPythonUpdated 7d ago
Who it's for

Builders who compare time series models, reproduce paper results, or adapt datasets and losses into a shared training setup.

What it delivers

You can train and benchmark many time series models in one framework without rewriting the surrounding experiment code.

What it does

Shared experiment runner

`exp/exp_basic.py` and `exp/exp_main.py` provide the common training and evaluation flow.

Model zoo

`models/` contains many forecasting, classification, and imputation models for regular and irregular time series.

Layer dependencies

`layers/` holds the supporting modules used by the models, including model-specific subfolders.

Dataset providers

`data/data_provider/` contains dataset classes and loading logic for supported time series datasets.

Loss functions

`loss_fns/` includes MAE, MSE, cross-entropy, dual MSE, and model-provided loss handling.

Per-model scripts

`scripts/` contains run setups for individual models and benchmark configurations.

How to get it

  1. 1Learning Recursive Multi-Scale Representations for Irregular Multivariate Time Series…
    @inproceedings{li_LearningRecursiveMultiScale_2026,
        author = {Li, Boyuan and Liu, Zhen and Luo, Yicheng  and Ma, Qianli},
        booktitle = {International Conference on Learning Representations},
        title = {Learning Recursive Multi-Scale Representations for Irregular Multivariate Time Series Forecasting},
        year = {2026}
    }
  2. 2HyperIMTS: Hypergraph Neural Network for Irregular Multivariate Time Series Forecasting…
    @inproceedings{li_HyperIMTSHypergraphNeural_2025,
        author = {Li, Boyuan and Luo, Yicheng and Liu, Zhen and Zheng, Junhao and Lv, Jianming and Ma, Qianli},
        booktitle = {Forty-Second International Conference on Machine Learning},
        title = {HyperIMTS: Hypergraph Neural Network for Irregular Multivariate Time Series Forecasting},
        year = {2025}
    }

README

A Researcher&Agent-Friendly Framework for Time Series Analysis.

Train Any Model on Any Dataset.

📊 Time series analysis leaderboard is now available on our 🤗 Hugging Face space. Discover the performance of different models!


This is also the official repository for the following paper:

  • Learning Recursive Multi-Scale Representations for Irregular Multivariate Time Series Forecasting (ICLR 2026) [poster] [OpenReview] [arXiv]

    @inproceedings{li_LearningRecursiveMultiScale_2026,
        author = {Li, Boyuan and Liu, Zhen and Luo, Yicheng  and Ma, Qianli},
        booktitle = {International Conference on Learning Representations},
        title = {Learning Recursive Multi-Scale Representations for Irregular Multivariate Time Series Forecasting},
        year = {2026}
    }
    
  • HyperIMTS: Hypergraph Neural Network for Irregular Multivariate Time Series Forecasting (ICML 2025) [poster] [OpenReview] [arXiv]

    @inproceedings{li_HyperIMTSHypergraphNeural_2025,
        author = {Li, Boyuan and Luo, Yicheng and Liu, Zhen and Zheng, Junhao and Lv, Jianming and Ma, Qianli},
        booktitle = {Forty-Second International Conference on Machine Learning},
        title = {HyperIMTS: Hypergraph Neural Network for Irregular Multivariate Time Series Forecasting},
        year = {2025}
    }
    

1. ✨ Hightlighted Features

  • Extensibility: Adapt your model/dataset once, train almost any combination of "model" $\times$ "dataset" $\times$ "loss function".
  • Compatibility: Accept models with any number/type of arguments in forward; Accept datasets with any number/type of return values in __getitem__; Accept tailored loss calculation for specific models.
  • Maintainability: No need to worry about breaking the training codes of existing models/datasets/loss functions when adding new ones.
  • Reproducibility: Minimal library dependencies for core components. Try the best to get rid of fancy third-party libraries (e.g., PyTorch Lightning, EasyTorch).
  • Efficiency: Multi-GPU parallel training; Python built-in logger; structured experimental result saving (json)...
  • Transferability: Even if you don't like our framework, you can still easily find and copy the models/datasets you want. No overwhelming encapsulation.

2. 🧭 Documentation

Checkout the new documentation website.

Using 🦞agent? Check out our official PyOmniTS skill on clawhub. Your agent will understand the essentials of our framework, and even automate the code replication process by adapting other papers' codes into PyOmniTS!

3. 🤖 Models

54 models, covering regular, irregular, pretrained, and traffic models, have been included in PyOmniTS, and more are coming.

Model classes can be found in models/, and their dependencies can be found in layers/

  • ✅: supported
  • ❌: not supported
  • '-': not implemented
  • MTS: regularly sampled multivariate time series
  • IMTS: able to handle irregularly sampled multivariate time series
ModelVenueTypeForecastingClassificationImputationAvailable Versions
Ada-MSHyperNeurIPS 2024MTSv1.0.0+
APNAAAI 2026IMTS--v1.3.2+
ASTGIICLR 2026IMTS--v2.0.1+
AutoformerNeurIPS 2021MTSv1.0.0+
ScaleformerICLR 2023MTS-v2.0.0+
BigSTVLDB 2024MTSv1.0.0+
CrossformerICLR 2023MTSv1.0.0+
CRUICML 2022IMTSv1.0.0+
DLinearAAAI 2023MTSv1.0.0+
ETSformerarXiv 2022MTSv1.0.0+
FEDformerICML 2022MTSv1.0.0+
FiLMNeurIPS 2022MTSv1.0.0+
FourierGNNNeurIPS 2023MTSv1.0.0+
FreTSNeurIPS 2023MTSv1.0.0+
GNeuralFlowNeurIPS 2024IMTSv1.0.0+
GraFITiAAAI 2024IMTSv1.0.0+
GRU-DScientific Reports 2018IMTSv1.0.0+
GRUwETMLR 2026IMTS---
HD-TTSICML 2024IMTS-v2.0.0+
Hi-PatchICML 2025IMTSv1.0.0+
higpICML 2024MTSv1.0.0+
HyperIMTS (Ours)ICML 2025IMTS-v1.0.0+
InformerAAAI 2021MTSv1.0.0+
iTransformerICLR 2024MTSv1.0.0+
KoopaNeurIPS 2023MTSv1.0.0+
Latent_ODENeurIPS 2019IMTSv1.0.0+
LeddamICML 2024MTSv1.0.0+
LightTSarXiv 2022MTSv1.0.0+
MambaLanguage Modeling 2024MTSv1.0.0+
MICNICLR 2023MTSv1.0.0+
MOIRAIICML 2024Any-v1.0.0+
mTANICLR 2021IMTSv1.0.0+
NeuralFlowsNeurIPS 2021IMTSv1.0.0+
NHITSAAAI 2023MTS-v2.0.0+
Nonstationary TransformerNeurIPS 2022MTSv1.0.0+
PatchTSTICLR 2023MTSv1.0.0+
PathformerICLR 2024MTS-v2.0.0+
PrimeNetAAAI 2023IMTSv1.0.0+
PyraformerICLR 2022MTSv2.0.0+
RaindropICLR 2022IMTSv1.0.0+
ReformerICLR 2020MTSv1.0.0+
ReIMTS (Ours)ICLR 2026IMTS-v2.0.0+
SeFTICML 2020IMTSv1.0.0+
SegRNNarXiv 2023MTSv1.0.0+
Temporal Fusion TransformerarXiv 2019MTS--v1.0.0+
TFMixerICML 2026IMTS--v2.0.1+
TiDETMLR 2023MTSv1.0.0+
TimeCHEATAAAI 2025MTSv1.0.0+
TimeMixerICLR 2024MTSv1.0.0+
TimesNetICLR 2023MTSv1.0.0+
tPatchGNNICML 2024IMTSv1.0.0+
TransformerNeurIPS 2017MTSv1.0.0+
TSMixerTMLR 2023MTSv1.0.0+
WarpformerKDD 2023IMTSv1.0.0+

4. 💾 Datasets

Dataest classes are put in data/data_provider/datasets, and dependencies can be found in data/dependencies:

11 datasets, covering regular and irregular ones, have been included in PyOmniTS, and more are coming.

  • ✅: supported
  • ❌: not supported
  • '-': not implemented
  • MTS: regularly sampled multivariate time series
  • IMTS: irregularly sampled multivariate time series
DatasetTypeFieldForecasting
ECLMTSelectricity
ETTh1MTSelectricity
ETTm1MTSelectricity
Human ActivityIMTSbiomechanics
ILIMTShealthcare
MIMIC IIIIMTShealthcare
MIMIC IVIMTShealthcare
PhysioNet'12IMTShealthcare
TrafficMTStraffic
USHCNIMTSweather
WeatherMTSweather

Datasets for classification and imputation have not released yet.

5. 📉 Loss Functions

The following loss functions are included under loss_fns/:

Loss FunctionTaskNote
CrossEntropyLossClassification-
MAEForecasting/Imputation-
ModelProvidedLoss-Some models prefer to calculate loss within forward(), such as GNeuralFlows.
MSE_DualForecasting/Imputation
MSEForecasting/Imputation-

6. 🚧 Roadmap

PyOmniTS is continously evolving:

  • More tutorials.
  • Classification support in core components.
  • Imputation support in core components.
  • Optional python package management via uv.

Yet Another Code Framework?

We encountered the following problems when using existing ones:

  • Argument & return value chaos for models' forward():

    Different models usually take varying number and shape of arguments, especially ones from different domains. Changes to training logic are needed to support these differences.

  • Return value chaos for datasets' __getitem__():

    datasets can return a number of tensors in different shapes, which have to be aligned with arguments of models' forward() one by one. Changes to training logic are also needed to support these differences.

  • Argument & return value chaos for loss functions' forward():

    loss functions take different types of tensors as input, require aligning with return values from models' forward().

  • Overwhelming dependencies:

    some existing pipelines use fancy high-level packages in building the pipeline, which can lower the flexibility of code modification.

Contributors

Ladbaby
Ladbaby

💻 🐛

Acknowledgement

Files in the repo

Repository payload22 top-level entries
  • .github
  • data
  • docs
  • exp
  • layers
  • loss_fns
  • lr_schedulers
  • models
  • scripts
  • tests
  • utils
  • .all-contributorsrc
  • .gitignore
  • .python-version
  • LICENSE
  • main.py
  • pyproject.toml
  • README.md
  • requirements.lock
  • requirements.txt
  • run_unittest.sh
  • run.sh

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More frameworks & sdks

HKUDS/nanobotFrameworks & SDKs

Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat apps

48k
microsoft/
SkillOpt
microsoft/SkillOptFrameworks & SDKs

SkillOpt is a text-space optimizer that trains reusable natural-language skills for frozen LLM agents through trajectory-driven edits, validation-gated updates, and deployable best_skill.md artifacts.

17k
omnigent-ai/omnigentFrameworks & SDKs

Omnigent is an open-source AI agent framework and meta-harness: orchestrate Claude Code, Codex, Cursor, Pi, and custom agents — swap harnesses without rewriting, enforce policies and sandboxing, and collaborate in real time from any device.

9.8k
kyegomez/
OpenMythos
kyegomez/OpenMythosFrameworks & SDKs

A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.

15k
D4Vinci/ScraplingFrameworks & SDKs

🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!

80k