Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5cbe8e5

Browse files
committed
Improves onnx_simple_text_plot
1 parentd83ff4e commit5cbe8e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎onnx_array_api/plotting/text_plot.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,10 @@ def str_node(indent, node):
824824
rows.append(f"opset: domain={opset.domain!r} version={opset.version!r}")
825825
ifhasattr(model,"graph"):
826826
ifmodel.doc_string:
827-
rows.append(f"doc_string:{model.doc_string}")
827+
iflen(model.doc_string)<55:
828+
rows.append(f"doc_string:{model.doc_string}")
829+
else:
830+
rows.append(f"doc_string:{model.doc_string[:55]}...")
828831
main_model=model
829832
model=model.graph
830833
else:
@@ -1044,7 +1047,10 @@ def _mark_link(rows, lengths, r1, r2, d):
10441047
forfctinmain_model.functions:
10451048
rows.append(f"----- function name={fct.name} domain={fct.domain}")
10461049
iffct.doc_string:
1047-
rows.append(f"----- doc_string:{fct.doc_string}")
1050+
iflen(fct.doc_string)<55:
1051+
rows.append(f"----- doc_string:{fct.doc_string}")
1052+
else:
1053+
rows.append(f"----- doc_string:{fct.doc_string[:55]}...")
10481054
res=onnx_simple_text_plot(
10491055
fct,
10501056
verbose=verbose,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp