Pytorch implementation of [BuildSyS '24] Are Time Series Foundation Models Ready to Revolutionize Predictive Building Analytics?
The following code will run inference on each model and dataset:
python main.py --model YOUR_MODEL --real_data DATA
Here,
real_data \in {ecobee, electricity_uci, umass}
model \in {AutoARIMA,
SeasonaARIMA,
moment,
chronos,
TimeGPT,
TimesFM,
uni2ts
...}
Download the dataset from ElectricityLoadDiagrams20112014
Then put LD2011_2014.txt
in the ./data/
folder.
Download the dataset Ecobee
Then put combined_thermostat_data.csv
in the ./data/
folder.
The smart* (umass) dataset has been uploaded with the repo.
To reproduce the results, please first setup environments for each model:
You can find it in this repo
Create an environment for Chronos
virtualenv chronos -p python3.10
source chronos/bin/activate
Install general packages
pip install -r requirements.txt
Install chronos
python3.10 -m pip install git+https://github.com/amazon-science/chronos-forecasting.git
You can find it in this repo
Create a environment for Moment. Please note that only python version >= 3.10 is supported.
virtualenv moment -p python3.10
source moment/bin/activate
Install general packages
pip install -r requirements.txt
Install moment
python3.10 -m pip install git+https://github.com/moment-timeseries-foundation-model/moment.git
- Clone repository:
git clone https://github.com/SalesforceAIResearch/uni2ts.git
cd uni2ts
- Create virtual environment:
virtualenv uni2ts -p python3.10
source uni2ts/bin/activate
- Build from source:
pip install -e '.[notebook]'
Install general packages
pip install -r requirements.txt
Install general packages
pip install -r requirements.txt
pip install nixtla>=0.5.1
need to get api key from nixtla
import pandas as pd
from nixtla import NixtlaClient
# 1. Instantiate the NixtlaClient
nixtla_client = NixtlaClient(api_key = 'YOUR API KEY HERE')
View the original repo. Follow the instruction in the repo to install the model.
[Update on 09/30/24] TimesFM can be installed via pip install timesfm
Create a new conda env
<!-- conda create -n LagLlama python=3.10
conda activate LagLlama -->
virtualenv LagLlama -p python3.10
source LagLlama/bin/activate
Install general packages
pip install -r requirements.txt
clone the repo
!git clone https://github.com/time-series-foundation-models/lag-llama/
Hyperlink your lag-llama folder to the current folder
ln -s <Your_lag-llama_folder> ./lag_src
Copy the model file and go to the lag-llama folder
cp lagllama_model.py ./lag_src
cd ./lag_src
install the requirements
!pip install -r requirements.txt --quiet # this could take some time # ignore the errors displayed by colab
download pretrained model weights from HuggingFace 🤗
!huggingface-cli download time-series-foundation-models/Lag-Llama lag-llama.ckpt --local-dir ./
copy the model file to lag-llama
If you have any questions or feedback, feel free to reach out:
-
Name: Ozan Baris Mulayim
-
Email: omulayim@andrew.cmu.edu
-
Name: Pengrui Quan
-
Email: prquan@ucla.edu