Skip to content

Commit 684b5b5

Browse files
authored
[IR] Fix bug in Model str method (#1851)
I mistakenly duplicated all functions many times.
1 parent 82f8d37 commit 684b5b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onnxscript/ir/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,8 +2357,8 @@ def __str__(self) -> str:
23572357
model_version={self.model_version!r},
23582358
>"""
23592359
graph_text = str(self.graph)
2360-
functions_text = ",\n\n".join(str(func) for func in self.functions.values())
2361-
return f"{signature}\n{graph_text}" + f"\n\n{functions_text}" * len(self.functions)
2360+
functions_text = "\n\n".join(str(func) for func in self.functions.values())
2361+
return f"{signature}\n{graph_text}" + f"\n\n{functions_text}"
23622362

23632363
def __repr__(self) -> str:
23642364
return f"""\

0 commit comments

Comments
 (0)