This repo provides official code for TimeRAF: Retrieval-Augmented Foundation model for Zero-shot Time Series Forecasting
The current Python versions supported are 3.9, 3.10, 3.11.
Install Pytorch and necessary dependencies.
pip install -r requirements.txt
You can download downstream datasets from Google Drive.
Put training datasets under the folder ./datasets/train/.
Put the knowledge base under the folder ./kb/.
Run the provided script
bash ./train.sh
Put downstream datasets under the folder ./datasets/test/.
Put the checkpoint under the folder ./checkpoints/.
Run the provided script
bash ./test.sh
For example, the inference output of the ETTm1 dataset is as follows:
{'eval_loss': 0.39922061562538147, 'eval_model_preparation_time': 0.0036, 'eval_runtime': 23.4378, 'eval_samples_per_second': 3412.228, 'eval_steps_per_second': 0.853}
where the 'eval_loss' is the MSE.
Put downstream datasets under the folder ./datasets/test/.
Run the provided script
bash ./baseline.sh
For example, the inference output of the baseline model on the ETTh2 dataset is as follows:
{'eval_loss': 0.2855670750141144, 'eval_model_preparation_time': 0.002, 'eval_runtime': 0.7691, 'eval_samples_per_second': 25346.349, 'eval_steps_per_second': 9.101}
where the 'eval_loss' is the MSE.
If you find our work helpful for your research, please consider citing our work.
@article{zhang2025timeraf,
title={Timeraf: Retrieval-augmented foundation model for zero-shot time series forecasting},
author={Zhang, Huanyu and Xu, Chang and Zhang, Yi-Fan and Zhang, Zhang and Wang, Liang and Bian, Jiang},
journal={IEEE Transactions on Knowledge and Data Engineering},
year={2025},
publisher={IEEE}
}
8 commits
Python
98.8%
Shell
1.2%
This repo provides official code for TimeRAF: Retrieval-Augmented Foundation model for Zero-shot Time Series Forecasting
The current Python versions supported are 3.9, 3.10, 3.11.
Install Pytorch and necessary dependencies.
pip install -r requirements.txt
You can download downstream datasets from Google Drive.
Put training datasets under the folder ./datasets/train/.
Put the knowledge base under the folder ./kb/.
Run the provided script
bash ./train.sh
Put downstream datasets under the folder ./datasets/test/.
Put the checkpoint under the folder ./checkpoints/.
Run the provided script
bash ./test.sh
For example, the inference output of the ETTm1 dataset is as follows:
{'eval_loss': 0.39922061562538147, 'eval_model_preparation_time': 0.0036, 'eval_runtime': 23.4378, 'eval_samples_per_second': 3412.228, 'eval_steps_per_second': 0.853}
where the 'eval_loss' is the MSE.
Put downstream datasets under the folder ./datasets/test/.
Run the provided script
bash ./baseline.sh
For example, the inference output of the baseline model on the ETTh2 dataset is as follows:
{'eval_loss': 0.2855670750141144, 'eval_model_preparation_time': 0.002, 'eval_runtime': 0.7691, 'eval_samples_per_second': 25346.349, 'eval_steps_per_second': 9.101}
where the 'eval_loss' is the MSE.
If you find our work helpful for your research, please consider citing our work.
@article{zhang2025timeraf,
title={Timeraf: Retrieval-augmented foundation model for zero-shot time series forecasting},
author={Zhang, Huanyu and Xu, Chang and Zhang, Yi-Fan and Zhang, Zhang and Wang, Liang and Bian, Jiang},
journal={IEEE Transactions on Knowledge and Data Engineering},
year={2025},
publisher={IEEE}
}
8 commits
Python
98.8%
Shell
1.2%