项目文件夹

文件

Inductive Representation Learning on Large Graphs (GraphSAGE)

Advanced usages, including how to run pure GPU sampling, how to train with PyTorch Lightning, etc., are in the advanced directory.

Requirements

pip install requests torchmetrics

Results

Full graph training

Run with following (available dataset: "cora", "citeseer", "pubmed")

python3 train_full.py --dataset cora --gpu 0    # full graph
  • cora: ~0.8330
  • citeseer: ~0.7110
  • pubmed: ~0.7830

Minibatch training for node classification

Train w/ mini-batch sampling for node classification on OGB-products:

python3 node_classification.py
python3 multi_gpu_node_classification.py

PyTorch Lightning for node classification

Train w/ mini-batch sampling for node classification with PyTorch Lightning on OGB-products. Works with both single GPU and multiple GPUs:

python3 lightning/node_classification.py

Train w/ mini-batch sampling for link prediction on OGB-Citation2:

python3 link_pred.py