When I replace sampler from gltorch to pyg (add as_pyg_v1=True in glt.loader.NeighborLoader), and run training example for igbh dataset, it returned error like this:
`Traceback (most recent call last):
File "train_rgnn.py", line 194, in
train(model, device, train_loader, val_loader, test_loader, args)
File "train_rgnn.py", line 72, in train
for batch in train_dataloader:
File "/mnt/disk1/kaixuan/anaconda3/envs/gltorch-cpu/lib/python3.8/site-packages/graphlearn_torch/loader/neighbor_loader.py",
line 104, in next
return self.sampler.sample_pyg_v1(seeds)
File "/mnt/disk1/kaixuan/anaconda3/envs/gltorch-cpu/lib/python3.8/site-packages/graphlearn_torch/sampler/neighbor_sampler.py
", line 414, in sample_pyg_v1
srcs = inducer.init_node(srcs)
TypeError: init_node(): incompatible function arguments. The following argument types are supported:
I looked through the code, and find the definition in sample_pyg_v1 only supports homogeneous graph, while glt supports both homo and hetero graph. So do you have plan to support pyg sampler for hetero graph?
@kaixuanliu sample_pyg_v1 is to adapt to the format of PyG's old version sampler. GLT's sampler output format is compatible to the current PyG data format.
š Describe the bug
When I replace sampler from gltorch to pyg (add
train(model, device, train_loader, val_loader, test_loader, args)
File "train_rgnn.py", line 72, in train
for batch in train_dataloader:
File "/mnt/disk1/kaixuan/anaconda3/envs/gltorch-cpu/lib/python3.8/site-packages/graphlearn_torch/loader/neighbor_loader.py",
line 104, in next
return self.sampler.sample_pyg_v1(seeds)
File "/mnt/disk1/kaixuan/anaconda3/envs/gltorch-cpu/lib/python3.8/site-packages/graphlearn_torch/sampler/neighbor_sampler.py
", line 414, in sample_pyg_v1
srcs = inducer.init_node(srcs)
TypeError: init_node(): incompatible function arguments. The following argument types are supported:
as_pyg_v1=True
in glt.loader.NeighborLoader), and run training example for igbh dataset, it returned error like this: `Traceback (most recent call last): File "train_rgnn.py", line 194, inInvoked with: <graphlearn_torch.py_graphlearn_torch.CPUHeteroInducer object at 0x7f9658039270>, tensor([ 9612, 26762, 38719, ..., 11742, 47627, 47025])`
cmd line:
python train_rgnn.py --model='rgat' --dataset_size='tiny' --num_classes=19 --cpu_mode
I looked through the code, and find the definition in
sample_pyg_v1
only supports homogeneous graph, while glt supports both homo and hetero graph. So do you have plan to support pyg sampler for hetero graph?Environment