This is an open-source library of the implementation of:
- FreTS - Frequency-domain MLPs are More Effective Learners in Time Series Forecasting [NeurIPS 2023]
- Pyraformer - Pyraformer: Low-complexity Pyramidal Attention for Long-range Time Series Modeling and Forecasting [ICLR 2022]
The repo is for the course project of Advanced Network Management (ANM) of Tsinghua University. The code base is mainly modified from Time Series Library (TSlib).
-
Install Python 3.8. We recommand using Anaconda to manage your environment. For example, you can create an environment with the following command.
conda create -n ANM python=3.8
After creating the environment, execute the following command to activate it.
conda activate ANM
-
Execute the following command to install requiements.
pip install -r requirements.txt
The requirements are verified with Ubuntu 22.04 and Nvidia RTX 3090 with CUDA 12.2. If you encounter an error like this
RuntimeError: CUDA error: no kernel image is available for execution on the device
in the folloing steps, you may need to reinstall a compatible version of your environment, see Pytorch. -
Prepare Data. Place the downloaded datasets in the folder
./dataset
. The datasets used in this project are provided by TA. -
Train and evaluate model. We provide the experiment scripts for all benchmarks under the folder
./scripts/
. You can reproduce the experiment results as the following examples:bash ./scripts/FreTS_ETT.sh
or run all experiments with
bash ./run.sh
If you only want to run some tests after training, execute
bash ./scripts/test-only/Tests.sh # only contains four configurations to reproduce the figures in the report
-
Checkpoints are stored in
./checkpoints/*/
inpth
format. Test results are stored in./results/*/
innpy
format. Visualization of predictions are stored in./test_results/*/
inpdf
format.