You can use the command hybrid-graph to train and evaluate GNNs predefined in HGB directly, if you have installed HGB via pip.
Training can be triggered with the following command. It takes only a few minutes to train a GCN even on a CPU.
#-a=gpu,cpu,tpu
hybrid-graph train grand_Lung gcn -a=cpu
Evaluation can be triggered with
# load the saved checkpoint from the path 'lightning_logs/version_0/checkpoints/best.ckpt'
hybrid-graph eval grand_lung gcn -load='lightning_logs/version_0/checkpoints/best.ckpt' -a=cpu
The command-line arguments are stored in the arguments dictionary as follows:
action: Name of the action to perform. (train, eval)dataset: Name of the dataset. (grand_Lung, musae_Facebook, amazon_Computer, …) Check below for all the options.model: Name of the model. (gcn, sage, gat, …) Check below for all the options.-load, --load-name: Name of the saved model to restore.-save, --save-name: Name of the saved model to save.-opt, --optimizer: Pick an optimizer.-lr, --learning-rate: Initial learning rate.-m, --max-epochs: Maximum number of epochs for training.-b, --batch-size: Batch size for training and evaluation.-d, --debug: Verbose debug.-seed, --seed: Number of steps for model optimization.-w, --num_workers: Number of CPU workers.-n, --num_devices: Number of GPU devices.-a, --accelerator: Accelerator style. (cpu, gpu, tpu)-s, --strategy: Strategy style. (ddp, ddp2, ddp_spawn, ddp_cpu, ddp_sharded, dp, horovod, single)grand_ArteryAorta: belong to one of GRAND-Tissues - This dataset contains a graph of the human aorta artery.grand_ArteryCoronary: belong to one of GRAND-Tissues - This dataset contains a graph of the coronary arteries.grand_Breast: belong to one of GRAND-Tissues - This dataset contains information about breast tissue.grand_Brain: belong to one of GRAND-Tissues - This dataset contains information about brain tissue.grand_Lung: belong to one of GRAND-Tissues - This dataset contains information about lung tissue.grand_Stomach: belong to one of GRAND-Tissues - This dataset contains information about stomach tissue.grand_Leukemia: belong to one of GRAND-Tissues - This dataset contains information about leukemia.grand_Lungcancer: belong to one of GRAND-Tissues - This dataset contains information about lung cancer.grand_Stomachcancer: belong to one of GRAND-Tissues - This dataset contains information about stomach cancer.grand_KidneyCancer: belong to one of GRAND-Tissues - This dataset contains information about kidney cancer.musae_Twitch_DE: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in German.musae_Twitch_EN: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in English.musae_Twitch_ES: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in Spanish.musae_Twitch_FR: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in French.musae_Twitch_PT: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in Portuguese.musae_Twitch_RU: belong to one of MUSAE-Twitch - This dataset contains a graph of Twitch streamers in Russian.musae_Facebook: belong to one of MUSAE-Facebook - This dataset contains a graph of Facebook users.musae_Github: belong to one of MUSAE-GitHub - This dataset contains a graph of GitHub users.musae_Wiki_chameleon: belong to one of MUSAE-Wiki - This dataset contains a graph of Wikipedia users editing pages about chameleons.musae_Wiki_crocodile: belong to one of MUSAE-Wiki - This dataset contains a graph of Wikipedia users editing pages about crocodiles.musae_Wiki_squirrel: belong to one of MUSAE-Wiki - This dataset contains a graph of Wikipedia users editing pages about squirrels.amazon_Computer: belong to one of Amazon-Computers - This dataset contains a graph of Amazon computer products.amazon_Photo: belong to one of Amazon-Photos - This dataset contains a graph of Amazon products related to photography.gcn: Graph Convolutional Network (GCN) - A classical type of GNN that applies the convolution operation to graphs.
sage: GraphSAGE (Sample and Aggregate) - Another type of GNN which learns an embedding by aggregating information from a node’s local neighborhood.
gat: Graph Attention Network (GAT) - A classsical type of GNN which applies attention mechanisms to weigh the importance of neighboring nodes when aggregating their information.
gatv2: GATv2 - An improved version of GAT.
hyper-gcn: Hypergraph Convolution (HyperConv) - A type of GNN designed to work with hypergraphs, where an edge can connect more than two nodes.
hyper-gat: Hypergraph Attention (HyperAtten) - An attention-based model similar to GAT, but designed for hypergraphs.
lp-gcn-hyper-gcn: LP-GCN+HyperConv - A Linear Probe model that combines GCN and HyperConv.
lp-gat-hyper-gcn: LP-GAT+HyperConv - A Linear Probe model that combines GAT and HyperGCN.
lp-gat-gcn: LP-GAT+GCN - A Linear Probe model that combines GAT and GCN.