Skip to content

Commit 27cdf83

Browse files
committed
fix
1 parent e1cd281 commit 27cdf83

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

_unittests/ut_torch_export_patches/test_patch_details.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import unittest
22
import torch
33
import transformers
4-
from onnx_diagnostic.ext_test_case import ExtTestCase, requires_transformers, hide_stdout
4+
from onnx_diagnostic.ext_test_case import (
5+
ExtTestCase,
6+
requires_transformers,
7+
hide_stdout,
8+
has_transformers,
9+
)
510
from onnx_diagnostic.torch_export_patches import torch_export_patches
611
from onnx_diagnostic.torch_export_patches.patch_inputs import use_dyn_not_str
712
from onnx_diagnostic.torch_export_patches.patch_details import PatchDetails, PatchInfo
@@ -67,8 +72,9 @@ def test_involved_patches(self):
6772
patches = details.patches_involded_in_graph(ep.graph)
6873
self.assertNotEmpty(patches)
6974
report = details.make_report(patches, format="rst")
70-
self.assertIn("====", report)
71-
self.assertIn("def longrope_frequency_update", report)
75+
if has_transformers("4.51"):
76+
self.assertIn("====", report)
77+
self.assertIn("def longrope_frequency_update", report)
7278

7379

7480
if __name__ == "__main__":

0 commit comments

Comments
 (0)