Skip to content

Commit 4bd2185

Browse files
committed
fix i
1 parent e4c9d6f commit 4bd2185

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

onnx_diagnostic/torch_export_patches/onnx_export_errors.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def unpatch_module(mod, info: Dict[type, Dict[type, Callable]], verbose: int = 0
6868
def _register_cache_serialization(verbose: int = 0) -> Dict[str, bool]:
6969
# Cache serialization: to be moved into appropriate packages
7070
import torch
71-
import transformers
7271
import packaging.version as pv
7372

7473
try:
@@ -111,7 +110,7 @@ def _register_cache_serialization(verbose: int = 0) -> Dict[str, bool]:
111110
# DynamicCache, _flatten_dynamic_cache_for_fx)
112111
# so we remove it anyway
113112
if DynamicCache in torch.fx._pytree.SUPPORTED_NODES and pv.Version(
114-
transformers.__version__
113+
torch.__version__
115114
) >= pv.Version("2.7"):
116115
if verbose:
117116
print("[_register_cache_serialization] DynamicCache is unregistered first.")

0 commit comments

Comments
 (0)