This repository contains source codes used for Sun, A.Y. and Sun, A.A, Zero-shot Forecasting of Streamflow Using Time Series Foundation Models: Are We There Yet? IOP Machine Learning: Earth, 2026
- 1d-ahead forecast
lstm_camelsdaily.py: main code for training 1d-ahead LSTM modelcamels_dataloader_daily.py: daily data loader filelstm.py: LSTM modelconfig_lstm_camelsdaily.yaml: YAML configuration file for 1d-ahead training
- 3H-ahead forecast
lstm_main.py: main code for training 3H-ahead LSTM modelcamels_dataloader.py: 3H data loader filelstm.py: LSTM modelconfig_lstm_camels.yaml: YAML configuratoin file for 3H-ahead training
- 1d-ahead forecast
tsfm/1d/sundial_camels_daily.py: main code for 1D-ahead univariate zero-shot benchmarking using Sundial, Chronos, TTM, and MOIRAItsfm/1d/camels_dataloader_daily.py: data loader routinestsfm/1d/config_sundial_camelsdaily.yaml: configuration file
- 3H-ahead forecast
tsfm/3h/sundial_camels.py: main code for 3H-ahead univariate zero-shot benchmarking using Sundial, Chronos, TTM, and MOIRAItsfm/3h/camels_dataloader.py: data loader routinestsfm/3h/config_sundail_camels.yaml: configuration file
Dependencies:
- pytorch, 2.3.1
- python, 3.10.0
- diffusers, 0.29.2
- accelerate, 0.31.0
- omegaconf, 2.3.0
- hydrostat, 1.0.0
The conda environments we used for benchmarking the TSFMs can be found under conda_env folder
sundial_env.yaml: for Sundial TSFMibm_ttm.yaml: for IBM's TTM modelchronos.yaml: for Amazon's Chronos modelmoirai_env.yaml: for SalesForce MOIRAI model
Note: the original CAMELS data can be here We referenced the github code repo of Kratzert et al, 2019, WRR, Toward Improved Predictions in Ungauged Basins: Exploiting the Power of Machine Learning to form some of the daily dataset.