Get Started

Temporal Graph Benchmark for Machine Learning on Temporal Graphs

Overview of the Temporal Graph Benchmark (TGB) pipeline:

  • TGB includes large-scale and realistic datasets from five different domains with both dynamic link prediction and node property prediction tasks
  • TGB automatically downloads datasets and processes them into numpy, PyTorch and PyG compatible TemporalData formats.
  • Novel TG models can be easily evaluated on TGB datasets via reproducible and realistic evaluation protocols.
  • TGB provides public and online leaderboards to track recent developments in temporal graph learning domain

The project website can be found here.

The API documentations can be found here.

all dataset download links can be found at info.py

TGB dataloader will also automatically download the dataset as well as the negative samples for the link property prediction datasets.

Running Example Methods

  • For the dynamic link property prediction task, see the examples/linkproppred folder for example scripts to run TGN, DyRep and EdgeBank on TGB datasets.
  • For the dynamic node property prediction task, see the examples/nodeproppred folder for example scripts to run TGN, DyRep and EdgeBank on TGB datasets.
  • For all other baselines, please see the TGB_Baselines repo.

pypi Installation

pip install py-tgb

see our pypi page

Manually Install Dependency

Our implementation works with python >= 3.9 and can be installed as follows

  1. set up virtual environment (conda should work as well)
    python -m venv ~/tgb_env/
    source ~/tgb_env/bin/activate
    
  2. install external packages
    pip install pandas==1.5.3
    pip install matplotlib==3.7.1
    pip install clint==0.5.1
    

install Pytorch and PyG dependencies (needed to run the examples)

pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cu117
pip install torch_geometric==2.3.0
pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.0.0+cu117.html
  1. install local dependencies under root directory /TGB
    pip install -e .