|
5 | 5 | from onnx_diagnostic.helpers import string_type |
6 | 6 | from onnx_diagnostic.helpers.cache_helper import make_dynamic_cache |
7 | 7 | from onnx_diagnostic.export import ModelInputs, CoupleInputsDynamicShapes |
8 | | -from onnx_diagnostic.torch_export_patches import bypass_export_some_errors |
| 8 | +from onnx_diagnostic.torch_export_patches import torch_export_patches |
9 | 9 |
|
10 | 10 |
|
11 | 11 | class TestDynamicShapes(ExtTestCase): |
@@ -571,7 +571,7 @@ def test_couple_input_ds_cache(self): |
571 | 571 |
|
572 | 572 | kwargs = {"A": T3x4, "B": (T3x1, cache)} |
573 | 573 | Cls = CoupleInputsDynamicShapes |
574 | | - with bypass_export_some_errors(patch_transformers=True): |
| 574 | + with torch_export_patches(patch_transformers=True): |
575 | 575 | self.assertEqual( |
576 | 576 | None, |
577 | 577 | Cls( |
@@ -749,7 +749,7 @@ def test_couple_input_ds_change_dynamic_dimensions_dynamic_cache(self): |
749 | 749 | {"A": make_dynamic_cache([(torch.ones((2, 2, 2, 2)), torch.ones((2, 2, 2, 2)))])}, |
750 | 750 | {"A": [[{0: "batch", 2: "last"}], [{0: "batch", 2: "last"}]]}, |
751 | 751 | ) |
752 | | - with bypass_export_some_errors(patch_transformers=True): |
| 752 | + with torch_export_patches(patch_transformers=True): |
753 | 753 | new_inputs = inst.change_dynamic_dimensions() |
754 | 754 | self.assertIsInstance(new_inputs["A"], transformers.cache_utils.DynamicCache) |
755 | 755 | self.assertEqual((3, 2, 3, 2), new_inputs["A"].key_cache[0].shape) |
|
0 commit comments