diff --git a/optimum/onnxruntime/modeling_decoder.py b/optimum/onnxruntime/modeling_decoder.py index 222fd9a852a..732597d9308 100644 --- a/optimum/onnxruntime/modeling_decoder.py +++ b/optimum/onnxruntime/modeling_decoder.py @@ -32,7 +32,7 @@ import onnxruntime from ..exporters.onnx import MODEL_TYPES_REQUIRING_POSITION_IDS, main_export -from ..onnx.utils import _get_external_data_paths +from ..onnx.utils import _get_external_data_paths, check_model_uses_external_data from ..utils import NormalizedConfigManager, check_if_transformers_greater from ..utils.file_utils import validate_file_exists from ..utils.save_utils import maybe_load_preprocessors, maybe_save_preprocessors @@ -49,7 +49,7 @@ parse_device, validate_provider_availability, ) -from ..onnx.utils import check_model_uses_external_data + if TYPE_CHECKING: from transformers import PretrainedConfig