README.md 1.2 KB
Newer Older
W
Webbley 已提交
1 2 3 4 5 6
# Graph Property Prediction for Open Graph Benchmark (OGB)

[The Open Graph Benchmark (OGB)](https://ogb.stanford.edu/) is a collection of benchmark datasets, data loaders, and evaluators for graph machine learning. Here we complete the Graph Property Prediction task based on PGL.

### Requirements

W
Webbley 已提交
7 8
- paddlpaddle >= 1.7.1
- pgl 1.0.2
W
Webbley 已提交
9 10 11 12 13 14 15 16 17 18
- ogb

NOTE: To install ogb that is fited for this project, run below command to install ogb
```
git clone https://github.com/snap-stanford/ogb.git
git checkout 482c40bc9f31fe25f9df5aa11c8fb657bd2b1621
python setup.py install
```

### How to run
W
Webbley 已提交
19
For example, use GPU to train model on ogbg-molhiv dataset and ogb-molpcba dataset.
W
Webbley 已提交
20
```
W
Webbley 已提交
21
CUDA_VISIBLE_DEVICES=1 python -u main.py --config hiv_config.yaml --use_cuda
W
Webbley 已提交
22

W
Webbley 已提交
23 24 25 26 27 28 29 30
CUDA_VISIBLE_DEVICES=2 python -u main.py --config pcba_config.yaml --use_cuda
```

If you want to use CPU to train model, environment variables `CPU_NUM` should be specified and should be in the range of 1 to N, where N is the total CPU number on your machine.
```
CPU_NUM=1 python -u main.py --config hiv_config.yaml

CPU_NUM=1 python -u main.py --config pcba_config.yaml
W
Webbley 已提交
31
```
32 33 34 35 36 37

### Experiment results

| model | hiv (rocauc)| pcba (prcauc)|
|-------|-------------|--------------|
| GIN   |0.7719 (0.0079) | 0.2232 (0.0018) |