File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
_unittests/ut_torch_export_patches Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11import unittest
22import torch
33import 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+ )
510from onnx_diagnostic .torch_export_patches import torch_export_patches
611from onnx_diagnostic .torch_export_patches .patch_inputs import use_dyn_not_str
712from 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
7480if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments