Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Dupre <[email protected]>
  • Loading branch information
xadupre committed Aug 5, 2024
1 parent 1badd80 commit 6248b74
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ def _add_attribute_to_torchscript_node(
)
if "TensorProtoDataType" in str(type(value)):
# torch._C._onnx.TensorProtoDataType
itype = int(value)
return node.i_(key, itype)
return node.i_(key, int(value))

raise TypeError(

Check warning on line 470 in onnxscript/function_libs/torch_lib/graph_building/_graph_building_torch.py

View check run for this annotation

Codecov / codecov/patch

onnxscript/function_libs/torch_lib/graph_building/_graph_building_torch.py#L470

Added line #L470 was not covered by tests
f"Unsupported attribute type '{type(value)}' for attribute '{key}' "
Expand Down

0 comments on commit 6248b74

Please sign in to comment.