Hi, I just followed the steps of the readme. I got an issue(see below) when I tried to train the model. I found you hardcode the edge_dim to 44. I am wondering how did you decide this value, is this value the edge type?
./TYGR train TRAIN.pkl VALID.pkl -o MODEL.model
hello
75
Source #functions: 177167
Well Formed #functions: 177167
Source #vars: 567268
Well Formed #vars: 567268
Source #functions: 22145
Well Formed #functions: 22145
Source #vars: 69694
Well Formed #vars: 69694
/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/optim/lr_scheduler.py:60: UserWarning: The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.
warnings.warn(
0%| | 0/5536 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/kun/TYGR/src/index.py", line 53, in
main(args)
File "/home/kun/TYGR/src/index.py", line 47, in main
modules[args.cmd].main(args)
File "/home/kun/TYGR/src/train.py", line 71, in main
learn.run(method, model, train_set, args, prompt=f"[Train] Epoch {e}", optimizer=optimizer, shuffle=not args.no_shuffle)
File "/home/kun/TYGR/src/utils/learn.py", line 55, in run
y_pred, loss = model(x)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/kun/TYGR/src/methods/glow/model.py", line 190, in forward
node_labels = layer(node_labels, edges, edge_labels)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch_geometric/nn/conv/rgcn_conv.py", line 228, in forward
segment_count = scatter(torch.ones_like(edge_type), edge_type,
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch_geometric/utils/scatter.py", line 75, in scatter
return src.new_zeros(size).scatter_add(dim, index, src)
RuntimeError: index 55 is out of bounds for dimension 0 with size 44
Hi, I just followed the steps of the readme. I got an issue(see below) when I tried to train the model. I found you hardcode the edge_dim to 44. I am wondering how did you decide this value, is this value the edge type?
./TYGR train TRAIN.pkl VALID.pkl -o MODEL.model
hello
75
Source #functions: 177167
Well Formed #functions: 177167
Source #vars: 567268
Well Formed #vars: 567268
Source #functions: 22145
Well Formed #functions: 22145
Source #vars: 69694
Well Formed #vars: 69694
/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/optim/lr_scheduler.py:60: UserWarning: The verbose parameter is deprecated. Please use get_last_lr() to access the learning rate.
warnings.warn(
0%| | 0/5536 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/kun/TYGR/src/index.py", line 53, in
main(args)
File "/home/kun/TYGR/src/index.py", line 47, in main
modules[args.cmd].main(args)
File "/home/kun/TYGR/src/train.py", line 71, in main
learn.run(method, model, train_set, args, prompt=f"[Train] Epoch {e}", optimizer=optimizer, shuffle=not args.no_shuffle)
File "/home/kun/TYGR/src/utils/learn.py", line 55, in run
y_pred, loss = model(x)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/kun/TYGR/src/methods/glow/model.py", line 190, in forward
node_labels = layer(node_labels, edges, edge_labels)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch_geometric/nn/conv/rgcn_conv.py", line 228, in forward
segment_count = scatter(torch.ones_like(edge_type), edge_type,
File "/home/kun/anaconda3/envs/TYGR/lib/python3.8/site-packages/torch_geometric/utils/scatter.py", line 75, in scatter
return src.new_zeros(size).scatter_add(dim, index, src)
RuntimeError: index 55 is out of bounds for dimension 0 with size 44