Skip to content

Commit a26916d

Browse files
committed
other series of fixes
1 parent 57e83b6 commit a26916d

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

_doc/examples/plot_dump_intermediate_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
# Let's create the ONNX model.
130130

131131
ep = torch.export.export(model, inputs, dynamic_shapes=ds)
132-
epo = torch.onnx.export(ep, dynamo=True)
132+
epo = torch.onnx.export(ep)
133133
epo.optimize()
134134
epo.save("plot_dump_intermediate_results.onnx")
135135

_doc/examples/plot_export_tiny_phi2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126

127127
with torch_export_patches(patch_transformers=True):
128128
epo = torch.onnx.export(
129-
ep, (), kwargs=copy.deepcopy(inputs), dynamic_shapes=dynamic_shapes, dynamo=True
129+
ep, (), kwargs=copy.deepcopy(inputs), dynamic_shapes=dynamic_shapes
130130
)
131131

132132
# %%

_unittests/ut_helpers/test_ort_session_tinyllm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_check_allruntimes_on_tiny_llm(self):
8787
proto = to_onnx(model, (), kwargs=copy.deepcopy(inputs), dynamic_shapes=ds)
8888
else:
8989
proto = torch.onnx.export(
90-
model, (), kwargs=copy.deepcopy(inputs), dynamic_shapes=ds, dynamo=True
90+
model, (), kwargs=copy.deepcopy(inputs), dynamic_shapes=ds
9191
).model_proto
9292

9393
self.dump_onnx("test_check_allruntimes_on_tiny_llm.onnx", proto)

_unittests/ut_torch_onnx/test_sbs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ def forward(self, x):
6868
ep = torch.export.export(
6969
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},)
7070
)
71-
epo = torch.onnx.export(
72-
ep, (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
73-
)
71+
epo = torch.onnx.export(ep, (x,), dynamic_shapes=({0: torch.export.Dim("batch")},))
7472
onx = epo.model_proto
7573
results = list(
7674
run_aligned(

_unittests/ut_xrun_doc/test_documentation_examples.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ def add_test_methods(cls):
116116
):
117117
reason = "unstable, let's wait for the next version"
118118

119+
if (
120+
not reason
121+
and name in {"plot_export_tiny_phi2.py"}
122+
and not has_transformers("4.55")
123+
):
124+
reason = "unstable, let's wait for the next version"
125+
119126
if reason:
120127

121128
@unittest.skip(reason)

onnx_diagnostic/torch_models/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def validate_model(
352352
The following exporters are available:
353353
354354
* ``export-nostrict``: run :func:`torch.export.export` (..., strict=False)
355-
* ``onnx-dynamo``: run :func:`torch.onnx.export` (..., dynamo=True),
355+
* ``onnx-dynamo``: run :func:`torch.onnx.export` (...),
356356
models can be optimized with ``optimization`` in ``("ir", "os_ort")``
357357
* ``modelbuilder``: use :epkg:`ModelBuilder` to builds the onnx model
358358
* ``custom``: custom exporter (see :epkg:`experimental-experiment`),

onnx_diagnostic/torch_onnx/sbs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def post_process(obs):
205205
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},)
206206
)
207207
onx = torch.onnx.export(
208-
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},), dynamo=True
208+
Model(), (x,), dynamic_shapes=({0: torch.export.Dim("batch")},)
209209
).model_proto
210210
results = list(
211211
map(

0 commit comments

Comments
 (0)