From 170eaba455bc85a51ec28195321024d3a63b804d Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Mon, 29 Jul 2024 15:10:41 +0200 Subject: [PATCH] style --- optimum/exporters/onnx/__main__.py | 1 - optimum/onnxruntime/modeling_seq2seq.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/optimum/exporters/onnx/__main__.py b/optimum/exporters/onnx/__main__.py index b71f9351b2a..703e98df3e2 100644 --- a/optimum/exporters/onnx/__main__.py +++ b/optimum/exporters/onnx/__main__.py @@ -21,7 +21,6 @@ from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE from packaging import version from requests.exceptions import ConnectionError as RequestsConnectionError - from transformers import AutoConfig, AutoTokenizer from transformers.utils import is_torch_available diff --git a/optimum/onnxruntime/modeling_seq2seq.py b/optimum/onnxruntime/modeling_seq2seq.py index 1b488d99832..48fb2300b27 100644 --- a/optimum/onnxruntime/modeling_seq2seq.py +++ b/optimum/onnxruntime/modeling_seq2seq.py @@ -28,8 +28,6 @@ import torch from huggingface_hub import hf_hub_download from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE - -import onnxruntime as ort from transformers import ( AutoModelForSeq2SeqLM, AutoModelForSpeechSeq2Seq, @@ -42,6 +40,8 @@ from transformers.models.auto.modeling_auto import MODEL_FOR_SPEECH_SEQ_2_SEQ_MAPPING_NAMES from transformers.models.whisper.generation_whisper import WhisperGenerationMixin +import onnxruntime as ort + from ..exporters.onnx import main_export from ..onnx.utils import _get_external_data_paths from ..utils import check_if_transformers_greater