Skip to content

Commit 939918f

Browse files
authored
Fix regexp error with searching onnx model (#1442)
1 parent 0e2ccef commit 939918f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

optimum/intel/openvino/modeling_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def from_pretrained(
479479

480480
ov_files = _find_files_matching_pattern(
481481
model_dir,
482-
pattern=cls._search_pattern if not kwargs.get("from_onnx", False) else "*.onnx",
482+
pattern=cls._search_pattern if not kwargs.get("from_onnx", False) else ".*\.onnx$",
483483
subfolder=subfolder,
484484
use_auth_token=token,
485485
revision=revision,

0 commit comments

Comments
 (0)