Commit
•
ee984cc
1
Parent(s):
68066ad
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,194 @@
|
|
1 |
-
---
|
2 |
-
license: cc-by-nc-4.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- code
|
7 |
+
pretty_name: README
|
8 |
+
---
|
9 |
+
<!-- # TGB -->
|
10 |
+
![TGB logo](imgs/logo.png)
|
11 |
+
|
12 |
+
**Temporal Graph Benchmark for Machine Learning on Temporal Graphs** (NeurIPS 2023 Datasets and Benchmarks Track)
|
13 |
+
<h4>
|
14 |
+
<a href="https://arxiv.org/abs/2307.01026"><img src="https://img.shields.io/badge/arXiv-pdf-yellowgreen"></a>
|
15 |
+
<a href="https://pypi.org/project/py-tgb/"><img src="https://img.shields.io/pypi/v/py-tgb.svg?color=brightgreen"></a>
|
16 |
+
<a href="https://tgb.complexdatalab.com/"><img src="https://img.shields.io/badge/website-blue"></a>
|
17 |
+
<a href="https://docs.tgb.complexdatalab.com/"><img src="https://img.shields.io/badge/docs-orange"></a>
|
18 |
+
</h4>
|
19 |
+
|
20 |
+
|
21 |
+
Overview of the Temporal Graph Benchmark (TGB) pipeline:
|
22 |
+
- TGB includes large-scale and realistic datasets from five different domains with both dynamic link prediction and node property prediction tasks.
|
23 |
+
- TGB automatically downloads datasets and processes them into `numpy`, `PyTorch` and `PyG compatible TemporalData` formats.
|
24 |
+
- Novel TG models can be easily evaluated on TGB datasets via reproducible and realistic evaluation protocols.
|
25 |
+
- TGB provides public and online leaderboards to track recent developments in temporal graph learning domain.
|
26 |
+
|
27 |
+
![TGB dataloading and evaluation pipeline](imgs/pipeline.png)
|
28 |
+
|
29 |
+
**To submit to [TGB leaderboard](https://tgb.complexdatalab.com/), please fill in this [google form](https://forms.gle/SEsXvN1QHo9tSFwx9)**
|
30 |
+
|
31 |
+
**See all version differences and update notes [here](https://tgb.complexdatalab.com/docs/update/)**
|
32 |
+
|
33 |
+
### Announcements
|
34 |
+
|
35 |
+
**Excited to announce TGX, a companion package for analyzing temporal graphs in WSDM 2024 Demo Track**
|
36 |
+
|
37 |
+
TGX supports all TGB datasets and provides numerous temporal graph visualization plots and statistics out of the box. See our paper: [Temporal Graph Analysis with TGX](https://arxiv.org/abs/2402.03651) and [TGX website](https://complexdata-mila.github.io/TGX/).
|
38 |
+
|
39 |
+
**Excited to announce that TGB has been accepted to NeurIPS 2023 Datasets and Benchmarks Track**
|
40 |
+
|
41 |
+
Thanks to everyone for your help in improving TGB! we will continue to improve TGB based on your feedback and suggestions.
|
42 |
+
|
43 |
+
**Please update to version `0.9.2`**
|
44 |
+
|
45 |
+
#### version `0.9.2`
|
46 |
+
|
47 |
+
Update the fix for `tgbl-flight` where now the unix timestamps are provided directly in the dataset. If you had issues with `tgbl-flight`, please remove `TGB/tgb/datasets/tgbl_flight`and redownload the dataset for a clean install
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
#### version `0.9.1`
|
52 |
+
|
53 |
+
Fixed an issue for `tgbl-flight` where the timestamp conversion is incorrect due to time zone differences. If you had issues with `tgbl-flight` before, please update your package.
|
54 |
+
|
55 |
+
|
56 |
+
#### version `0.9.0`
|
57 |
+
|
58 |
+
Added the large `tgbn-token` dataset with 72 million edges to the `nodeproppred` dataset.
|
59 |
+
|
60 |
+
Fixed errors in `tgbl-coin` and `tgbl-flight` where a small set of edges are not sorted chronologically. Please update your dataset version for them to version 2 (will be prompted in terminal).
|
61 |
+
|
62 |
+
|
63 |
+
### Pip Install
|
64 |
+
|
65 |
+
You can install TGB via [pip](https://pypi.org/project/py-tgb/). **Requires python >= 3.9**
|
66 |
+
```
|
67 |
+
pip install py-tgb
|
68 |
+
```
|
69 |
+
|
70 |
+
### Links and Datasets
|
71 |
+
|
72 |
+
The project website can be found [here](https://tgb.complexdatalab.com/).
|
73 |
+
|
74 |
+
The API documentations can be found [here](https://shenyanghuang.github.io/TGB/).
|
75 |
+
|
76 |
+
all dataset download links can be found at [info.py](https://github.com/shenyangHuang/TGB/blob/main/tgb/utils/info.py)
|
77 |
+
|
78 |
+
TGB dataloader will also automatically download the dataset as well as the negative samples for the link property prediction datasets.
|
79 |
+
|
80 |
+
if website is unaccessible, please use [this link](https://tgb-website.pages.dev/) instead.
|
81 |
+
|
82 |
+
|
83 |
+
### Running Example Methods
|
84 |
+
|
85 |
+
- For the dynamic link property prediction task, see the [`examples/linkproppred`](https://github.com/shenyangHuang/TGB/tree/main/examples/linkproppred) folder for example scripts to run TGN, DyRep and EdgeBank on TGB datasets.
|
86 |
+
- For the dynamic node property prediction task, see the [`examples/nodeproppred`](https://github.com/shenyangHuang/TGB/tree/main/examples/nodeproppred) folder for example scripts to run TGN, DyRep and EdgeBank on TGB datasets.
|
87 |
+
- For all other baselines, please see the [TGB_Baselines](https://github.com/fpour/TGB_Baselines) repo.
|
88 |
+
|
89 |
+
### Acknowledgments
|
90 |
+
We thank the [OGB](https://ogb.stanford.edu/) team for their support throughout this project and sharing their website code for the construction of [TGB website](https://tgb.complexdatalab.com/).
|
91 |
+
|
92 |
+
|
93 |
+
### Citation
|
94 |
+
|
95 |
+
If code or data from this repo is useful for your project, please consider citing our paper:
|
96 |
+
```
|
97 |
+
@article{huang2023temporal,
|
98 |
+
title={Temporal graph benchmark for machine learning on temporal graphs},
|
99 |
+
author={Huang, Shenyang and Poursafaei, Farimah and Danovitch, Jacob and Fey, Matthias and Hu, Weihua and Rossi, Emanuele and Leskovec, Jure and Bronstein, Michael and Rabusseau, Guillaume and Rabbany, Reihaneh},
|
100 |
+
journal={Advances in Neural Information Processing Systems},
|
101 |
+
year={2023}
|
102 |
+
}
|
103 |
+
```
|
104 |
+
<!--
|
105 |
+
|
106 |
+
### Install dependency
|
107 |
+
Our implementation works with python >= 3.9 and can be installed as follows
|
108 |
+
|
109 |
+
1. set up virtual environment (conda should work as well)
|
110 |
+
```
|
111 |
+
python -m venv ~/tgb_env/
|
112 |
+
source ~/tgb_env/bin/activate
|
113 |
+
```
|
114 |
+
|
115 |
+
2. install external packages
|
116 |
+
```
|
117 |
+
pip install pandas==1.5.3
|
118 |
+
pip install matplotlib==3.7.1
|
119 |
+
pip install clint==0.5.1
|
120 |
+
```
|
121 |
+
|
122 |
+
install Pytorch and PyG dependencies (needed to run the examples)
|
123 |
+
```
|
124 |
+
pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cu117
|
125 |
+
pip install torch_geometric==2.3.0
|
126 |
+
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
|
127 |
+
```
|
128 |
+
|
129 |
+
3. install local dependencies under root directory `/TGB`
|
130 |
+
```
|
131 |
+
pip install -e .
|
132 |
+
```
|
133 |
+
|
134 |
+
|
135 |
+
### Instruction for tracking new documentation and running mkdocs locally
|
136 |
+
|
137 |
+
1. first run the mkdocs server locally in your terminal
|
138 |
+
```
|
139 |
+
mkdocs serve
|
140 |
+
```
|
141 |
+
|
142 |
+
2. go to the local hosted web address similar to
|
143 |
+
```
|
144 |
+
[14:18:13] Browser connected: http://127.0.0.1:8000/
|
145 |
+
```
|
146 |
+
|
147 |
+
Example: to track documentation of a new hi.py file in tgb/edgeregression/hi.py
|
148 |
+
|
149 |
+
|
150 |
+
3. create docs/api/tgb.hi.md and add the following
|
151 |
+
```
|
152 |
+
# `tgb.edgeregression`
|
153 |
+
|
154 |
+
::: tgb.edgeregression.hi
|
155 |
+
```
|
156 |
+
|
157 |
+
4. edit mkdocs.yml
|
158 |
+
```
|
159 |
+
nav:
|
160 |
+
- Overview: index.md
|
161 |
+
- About: about.md
|
162 |
+
- API:
|
163 |
+
other *.md files
|
164 |
+
- tgb.edgeregression: api/tgb.hi.md
|
165 |
+
```
|
166 |
+
|
167 |
+
### Creating new branch ###
|
168 |
+
```
|
169 |
+
git fetch origin
|
170 |
+
|
171 |
+
git checkout -b test origin/test
|
172 |
+
```
|
173 |
+
|
174 |
+
### dependencies for mkdocs (documentation)
|
175 |
+
```
|
176 |
+
pip install mkdocs
|
177 |
+
pip install mkdocs-material
|
178 |
+
pip install mkdocstrings-python
|
179 |
+
pip install mkdocs-jupyter
|
180 |
+
pip install notebook
|
181 |
+
```
|
182 |
+
|
183 |
+
|
184 |
+
### full dependency list
|
185 |
+
Our implementation works with python >= 3.9 and has the following dependencies
|
186 |
+
```
|
187 |
+
pytorch == 2.0.0
|
188 |
+
torch-geometric == 2.3.0
|
189 |
+
torch-scatter==2.1.1
|
190 |
+
torch-sparse==0.6.17
|
191 |
+
torch-spline-conv==1.2.2
|
192 |
+
pandas==1.5.3
|
193 |
+
clint==0.5.1
|
194 |
+
``` -->
|