Code Monkey home page Code Monkey logo

tgb's Introduction

TGB logo

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

TGB dataloading and evaluation pipeline

To submit to TGB leaderboard, please fill in this google form

See all version differences and update notes here

Annoucements

Please update to version 0.8.0

version 0.8.0

fixing metric computation issue in node property prediction task, tgbn leaderboards results are updated to reflect the changes. Please refer to examples/nodeproppred/ example folders to how to compute the metric correctly. No changes for linkproppred datasets.

version 0.7.5

the negative samples for the tgbl-wiki and tgbl-review dataset has been updated and redownload of the dataset would be needed (will be prompted automatically in this version when you use the dataloader)

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.

if website is unaccessible, please use this link instead.

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.

tgb's People

Contributors

shenyanghuang avatar fpour avatar emalgorithm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.