-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Open
Labels
oncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queue
Description
🚀 The feature, motivation and pitch
Hello,
I get this error once I call the following line after my model is trained.
model_scripted = torch.jit.script(model) # Export to TorchScript
model_scripted.save('model_scripted.pt') # Save
my model has a HeteroGraphConv layer that uses dictionary-based arguments (two node types). However, TorchScript has limitations compared to dynamic Python execution, and keyword argument expansion is one of the features not supported in TorchScript.
Not sure if it's a bug or a feature to be developed, but NotSupportedError made me think it's a feature request.
Thanks!
Alternatives
No response
Additional context
torch.jit.frontend.NotSupportedError: keyword-arg expansion is not supported:
File "../opt/anaconda3/lib/python3.9/site-packages/dgl/nn/pytorch/hetero.py", line 178
(src_inputs[stype], dst_inputs[dtype]),
*mod_args.get(etype, ()),
**mod_kwargs.get(etype, {}))
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
outputs[dtype].append(dstdata)
else:
Metadata
Metadata
Assignees
Labels
oncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queue