RepoNVIDIANVIDIApublished Jun 9, 2026seen Jun 26

NVIDIA/gmmts_lib

Python

Open original ↗

Captured source

source ↗
published Jun 9, 2026seen Jun 26captured Oct 16http 200method plain

NVIDIA/gmmts_lib

Description: The official code for the paper GMMTS

Language: Python

License: Apache-2.0

Stars: 3

Forks: 5

Open issues: 0

Created: 2026-06-09T11:15:23Z

Pushed: 2026-06-09T11:18:40Z

Default branch: main

Fork: no

Archived: no

README:

GMM-TS: Gating-based Multimodal Time Series Forecasting

A gating framework for multimodal time series forecasting that dynamically combines predictions from multiple expert models—time-series foundation models and text/LLM-based models—to improve long-term forecast accuracy.

Overview

GMM-TS (Gating-based Multimodal Time Series Forecasting) learns a gating network that adaptively weights expert model outputs for each forecast horizon. It supports two training paradigms:

  • Online gating — trains expert models and the gating network jointly in an end-to-end pipeline.
  • Offline gating — combines pre-trained time-series foundation network (TSFN) and time-series foundation text (TSFT) experts via a learned gating module.

GMM-TS adds the gating network and experiment runners on top of MM-TSFlib. Expert model architectures (`models/`, `layers/`) and datasets are loaded from your MM-TSFlib clone via MM_TSFLIB_PATH — they are not vendored in this repository.

Third-Party Software

This project will download and install additional third-party open source software projects. Review the license terms of these open source projects before use.

See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for additional information.

Getting Started

# Clone GMM-TS
git clone https://github.com/NVIDIA/gmmts_lib.git
cd gmmts_lib

# Clone MM-TSFlib (required — provides models, layers, and data)
git clone https://github.com/AdityaLab/MM-TSFlib.git
cd MM-TSFlib
git checkout e789ce78c9bafd8e3ba0d8850f9ad2becbe83548
pip install -r environment.txt
cd ../gmmts_lib

# Create a virtual environment and install GMM-TS
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .

# Required: point to your MM-TSFlib clone (code + data)
export MM_TSFLIB_PATH=/path/to/MM-TSFlib

# Generate expert configuration (required before gating experiments)
python scripts/dataset_prep_scripts/prepare_all_expert_config.py \
--dataset_folder /path/to/expert/latents \
--out_file all_experts_config.csv

# Run offline gating (example)
python run_offline_gating.py \
--task_name mm_long_term_forecast \
--is_training 1 \
--pred_len 96 \
--tsfn_experts Informer \
--tsft_experts BERT \
--domain Environment

# Run online gating (example)
python run_online_gating.py \
--task_name long_term_forecast \
--is_training 1 \
--model Informer \
--data custom \
--root_path $MM_TSFLIB_PATH/data/Environment \
--data_path NewYork_AQI_Day.csv \
--pred_len 96 \
--llm_model BERT

# Verify installation
python -c "from gmm_ts import GatingNet; print('GMM-TS OK')"

See the examples/ directory for batch experiment scripts covering daily, weekly, and monthly forecasting configurations.

Requirements

  • OS/Arch: Linux recommended; macOS supported for development (GPU optional)
  • Python: 3.10+ (required by updated scipy, scikit-learn, and torch pins)
  • Runtime: PyTorch 2.0+
  • GPU/Drivers (recommended): CUDA-capable GPU with compatible NVIDIA driver
  • [MM-TSFlib](https://github.com/AdityaLab/MM-TSFlib) (required): clone and set MM_TSFLIB_PATH — provides expert models/, layers/, and data/
  • Pinned commit: e789ce78c9bafd8e3ba0d8850f9ad2becbe83548 (MM-TSFlib main as of June 2025)
  • Install MM-TSFlib dependencies: pip install -r $MM_TSFLIB_PATH/environment.txt
  • Expert config: all_experts_config.csv (generated by scripts/dataset_prep_scripts/prepare_all_expert_config.py after expert latents are saved)

Usage

# Offline gating with multiple experts
python run_offline_gating.py \
--task_name mm_long_term_forecast \
--is_training 1 \
--pred_len 96 \
--agg_type direct \
--expert_input_type latent \
--tsfn_experts Informer,Reformer \
--tsft_experts GPT2,BERT \
--domain Environment \
--train_epochs 10 \
--batch_size 32
  • More examples/tutorials: see examples/ for shell scripts (run_offline_gating_*.sh, run_online_gating_*.sh)
  • Built on MM-TSFlib: https://github.com/AdityaLab/MM-TSFlib

Expert configuration

Gating experiments require all_experts_config.csv, which maps each expert model to its latent dimensions and output paths. Generate it after saving expert latents:

python scripts/dataset_prep_scripts/prepare_all_expert_config.py \
--dataset_folder /path/to/gating/datasets \
--out_file all_experts_config.csv

Pass the file to gating runs with --all_experts_config all_experts_config.csv (default).

Performance (Optional)

Benchmark results depend on the expert models, domain, and prediction horizon. Use the provided example scripts to reproduce experiments across prediction lengths (48, 96, 192, 336) and domains.

Releases & Roadmap

  • Releases/Changelog: tracked via GitHub releases (see repository tags)

Contribution Guidelines

  • Start here: CONTRIBUTING.md
  • Code of Conduct: CODE_OF_CONDUCT.md
  • Development quickstart (build/test):
git clone https://github.com/NVIDIA/gmmts_lib.git
cd gmmts_lib
# Clone and pin MM-TSFlib, then:
export MM_TSFLIB_PATH=/path/to/MM-TSFlib
pip install -r requirements.txt
pip install -r $MM_TSFLIB_PATH/environment.txt
pip install -e ".[dev]"
./print_env.sh

Governance & Maintainers

  • Maintainers: MAINTAINERS.md
  • Kathy Razmadze (krazmadze@nvidia.com), Yoli Shavit (yolis@nvidia.com)
  • Labeling/triage policy: use GitHub issue labels for bug, enhancement, and documentation requests

Security

  • Vulnerability disclosure: SECURITY.md
  • Do not file public issues for security reports.

Support

Community

For questions and discussions, open a GitHub issue in this repository.

References

License

This project is licensed under the Apache License 2.0 — see the [LICENSE](LICENSE) file for details.

Notability

notability 3.0/10

New library repo from NVIDIA, no traction details.