Skip to content

Commit 463dea5

Browse files
committed
Removed importlib
Signed-off-by: Asmita Goswami <[email protected]>
1 parent 0ad0262 commit 463dea5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

QEfficient/base/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
QEFFAutoModel provides a common interface for loading the HuggingFace models using either the HF card name of local path of downloaded model.
1313
"""
1414

15-
import importlib
1615
from typing import Any
1716

1817
import transformers.models.auto.modeling_auto as mapping
@@ -51,7 +50,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: str, *args, **kwargs) ->
5150

5251
class_name = MODEL_CLASS_MAPPING.get(architecture)
5352
if class_name:
54-
module = importlib.import_module("QEfficient.transformers.models.modeling_auto")
53+
module = __import__("QEfficient.transformers.models.modeling_auto")
5554
model_class = getattr(module, class_name)
5655
else:
5756
raise NotImplementedError(

0 commit comments

Comments
 (0)