Skip to content

Commit 25ad8f6

Browse files
committed
dupates
1 parent a97097b commit 25ad8f6

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

_unittests/ut_export/test_shape_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def test_all_dynamic_shape_from_cache(self):
2525
ds = all_dynamic_shape_from_inputs(cache)
2626
self.assertEqual([[{0: "d_0_0", 1: "d_0_1"}], [{0: "d_1_0", 1: "d_1_1"}]], ds)
2727

28+
@requires_transformers("4.52")
2829
@requires_torch("2.7.99")
2930
def test_all_dynamic_shape_all_transformers_cache(self):
3031
caches = [

onnx_diagnostic/export/shape_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def all_dynamic_shape_from_inputs(inputs: Any, dim_prefix: Any = "d") -> Any:
99
All dimensions are considered as dynamic.
1010
``dim_prefix`` can be a string (the function uses it as a prefix),
1111
or ``torch.export.Dim.AUTO`` or ``torch.export.Dim.DYNAMIC``.
12+
For caches, ``transformers>=4.52```is better.
1213
1314
.. runpython::
1415
:showcode:

onnx_diagnostic/torch_models/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ def _mk(key):
11241124
)
11251125
if runtime == "onnxruntime"
11261126
else (
1127-
lambda model, providers, _cls_=TorchOnnxEvaluator: _cls_(
1127+
lambda model, providers, _cls_=TorchOnnxEvaluator: _cls_( # type: ignore[misc]
11281128
model, providers=providers, verbose=max(verbose - 1, 0)
11291129
)
11301130
)

0 commit comments

Comments
 (0)