Skip to content

Welcome to BuildingsBench


BuildingsBench is a platform for:

  • Large-scale pretraining with the synthetic Buildings-900K dataset for short-term load forecasting (STLF). Buildings-900K is statistically representative of the entire U.S. building stock and is extracted from the NREL End-Use Load Profiles database.
  • Benchmarking on two tasks evaluating generalization: zero-shot STLF and transfer learning for STLF.

We provide an index-based PyTorch Dataset for large-scale pretraining, easy data loading for multiple real building energy consumption datasets as PyTorch Tensors or Pandas DataFrames, from simple persistence to advanced transformer baselines, metrics management, a tokenizer based on KMeans for load time series, and more.

Read more about BuildingsBench in our paper.

Getting started


If you aren't going to pretrain or evaluate models and just want access to the provided dataloaders, model code, metrics computation, etc., install the package with:

pip install buildings_bench

Full installation

Otherwise, clone this repository and install it in editable mode in a virtual environment or a conda environment.

  1. Create an environment with python>=3.8, for example: conda create -n buildings_bench python=3.8.
  2. Install the package in editable mode with
    git clone
    cd BuildingsBench
    pip install -e ".[benchmark]"

Installing faiss-gpu

Due to a PyPI limitation, we have to install faiss-gpu (for KMeans) by directly downloading the wheel from Download the wheel for the python version you are using, then install it in your environment.

For example:


pip install faiss_gpu-1.7.3-cp38-cp38-manylinux2014_x86_64.whl

[Optional] Installing LightGBM

If running the LightGBM baseline, you will need to install LightGBM.

  1. Follow instructions here for your OS.
  2. Then install skforecast with pip install skforecast==0.8.1.

Environment variables

Set the environment variable BUILDINGS_BENCH to the path where the data directory BuildingsBench is located (created when untarring the data files). This is not the path to the code repository.

export BUILDINGS_BENCH=/path/to/BuildingsBench

If using wandb, set the following:

  • WANDB_ENTITY: your wandb username
  • WANDB_PROJECT: the name of your wandb project for this benchmark

Run tests

Verify your installation by running unit tests:

python -m unittest

Next steps

  1. Download and get familiar with the datasets
  2. Learn how to download a pretrained model and run it on a building dataset
  3. Learn how to run a custom model on the benchmark
  4. Computing metrics and interpreting the results

List of all tutorials.


If you use BuildingsBench in your research, please cite our preprint:

  title={BuildingsBench: A Large-Scale Dataset of 900K Buildings and Benchmark for Short-Term Load Forecasting},
  author={Emami, Patrick and Sahu, Abhijeet and Graf, Peter},
  journal={arXiv preprint arXiv:2307.00142},