Skip to content

Commit 92decb4

Browse files
authored
Fix proto handling in version converter (#2411)
Reported in onnx/onnx#7037 (comment), there is an error when we remove all function protos when running the version converter.
1 parent 38871a5 commit 92decb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxscript/version_converter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@ def convert_version(
169169
if model_proto is not None:
170170
# Update the model proto in-place
171171
model_proto.graph.Clear()
172-
del model_proto.functions
172+
del model_proto.functions[:]
173173
model_proto.graph.CopyFrom(ir.to_proto(model.graph))

0 commit comments

Comments
 (0)