Skip to content

Commit c4185ed

Browse files
committed
fix
1 parent e662b5f commit c4185ed

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

onnx_diagnostic/torch_export_patches/onnx_export_errors.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,11 @@ def _patch_transformers(
492492
except ImportError:
493493
modeling_rope_utils = None
494494

495-
if patch_details and modeling_rope_utils:
495+
if (
496+
patch_details
497+
and modeling_rope_utils
498+
and hasattr(modeling_rope_utils, "dynamic_rope_update")
499+
):
496500
patch_details.append(
497501
"patch_transformers",
498502
modeling_rope_utils.dynamic_rope_update,

onnx_diagnostic/torch_export_patches/patches/patch_transformers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _is_torchdynamo_exporting() -> bool:
6666
return False
6767

6868

69-
patch_sdpa_is_causal = _has_transformers("4.55")
69+
patch_sdpa_is_causal = _has_transformers("5.0")
7070
patch_is_initialized = _has_transformers("4.56.99")
7171

7272

0 commit comments

Comments
 (0)