Skip to main content

TGB

Temporal Graph Benchmark for Machine Learning on Temporal Graphs

TGB dataloading and evaluation pipeline

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

Pip Install

You can install TGB via pip

pip install py-tgb

Links and Datasets

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.

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
  1. 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 .

Instruction for tracking new documentation and running mkdocs locally

  1. first run the mkdocs server locally in your terminal
mkdocs serve
  1. go to the local hosted web address similar to
[14:18:13] Browser connected: http://127.0.0.1:8000/

Example: to track documentation of a new hi.py file in tgb/edgeregression/hi.py

  1. create docs/api/tgb.hi.md and add the following
# `tgb.edgeregression`

::: tgb.edgeregression.hi
  1. edit mkdocs.yml
nav:
  - Overview: index.md
  - About: about.md
  - API:
	other *.md files 
	- tgb.edgeregression: api/tgb.hi.md

Creating new branch

git fetch origin

git checkout -b test origin/test

dependencies for mkdocs (documentation)

pip install mkdocs
pip install mkdocs-material
pip install mkdocstrings-python
pip install mkdocs-jupyter
pip install notebook

full dependency list

Our implementation works with python >= 3.9 and has the following dependencies

pytorch == 2.0.0
torch-geometric == 2.3.0
torch-scatter==2.1.1
torch-sparse==0.6.17
torch-spline-conv==1.2.2
pandas==1.5.3
clint==0.5.1

Acknowledgments

We thank the OGB team for their support throughout this project and sharing their website code for the construction of TGB website.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_tgb-0.7.0.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_tgb-0.7.0-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

Details for the file py_tgb-0.7.0.tar.gz.

File metadata

  • Download URL: py_tgb-0.7.0.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1041-azure

File hashes

Hashes for py_tgb-0.7.0.tar.gz
Algorithm Hash digest
SHA256 6a12466a3b798f3de869e47f54888d426122aab2e46e1f81017080aa7d69d970
MD5 51e66a33691d4e0c89d4af8507586e61
BLAKE2b-256 1957c913845e93637f70ea582c1abca8b5c6164aac2b6b05388a951c0902bb68

See more details on using hashes here.

File details

Details for the file py_tgb-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: py_tgb-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.0 Linux/5.15.0-1041-azure

File hashes

Hashes for py_tgb-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25addc975349b5c0708806db277186f7205f55f791fc253eed0da316c6686466
MD5 d6094f8c6cb2effc6ca6212924406353
BLAKE2b-256 6a58434c59bcf2c3f7120652b9fddaa5aee7e06dd6730e41a60cf3b72c166096

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.5

2 files

This release

0.7.0 This release

2 files

0.6.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1

3 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page