Skip to content

Commit 281c18d

Browse files
committed
improves documentation
1 parent f7bdb1a commit 281c18d

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

_doc/examples/plot_export_locate_issue.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@ def forward(self, x: torch.Tensor, ys: list[torch.Tensor]):
103103
# File "onnx-diagnostic/_doc/examples/plot_export_locate_issue.py", line 25, in forward
104104
# z = x * caty
105105

106+
# %%
106107

107-
doc.plot_legend("was inferred to be a constant", "torch.export.export", "tomato")
108+
doc.plot_legend("was inferred\nto be a constant", "torch.export.export", "tomato")

_doc/examples/plot_export_with_dynamic_shapes_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ def forward(self, x, y, z):
9494

9595
# %%
9696

97-
doc.plot_legend("dynamic shapes inferred", "torch.export.export", "tomato")
97+
doc.plot_legend("dynamic shapes\ninferred", "torch.export.export", "tomato")

_doc/examples/plot_failing_onnxruntime_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@
106106
# It is possible to insert prints in the python code to print
107107
# more information or debug if needed.
108108

109-
doc.plot_legend("onnxruntime running step by step", "OnnxruntimeEvaluator", "lightgrey")
109+
doc.plot_legend("onnxruntime running\nstep by step", "OnnxruntimeEvaluator", "lightgrey")

_doc/examples/plot_failing_reference_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
# It is possible to insert prints in the python code to print
8282
# more information or debug if needed.
8383

84-
doc.plot_legend("Python Runtime for ONNX", "ExtendedReferenceEvalutor", "lightgrey")
84+
doc.plot_legend("Python Runtime\nfor ONNX", "ExtendedReferenceEvalutor", "lightgrey")

onnx_diagnostic/doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def plot_legend(
1212
) -> "matplotlib.axes.Axes": # noqa: F821
1313
import matplotlib.pyplot as plt
1414

15-
fig = plt.figure()
15+
fig = plt.figure(figsize=(2, 2))
1616
ax = fig.add_subplot()
1717
ax.axis([0, 5, 0, 5])
1818
ax.text(2.5, 4, "END", fontsize=50, horizontalalignment="center")

0 commit comments

Comments
 (0)