Skip to content

Commit 8fcfd22

Browse files
committed
Models test config in single Config file
Signed-off-by: Abukhoyer Shaik <[email protected]>
1 parent c3aa753 commit 8fcfd22

File tree

8 files changed

+742
-641
lines changed

8 files changed

+742
-641
lines changed

QEfficient/utils/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ONNX_EXPORT_EXAMPLE_SEQ_LEN = 32
1818
ONNX_EXPORT_EXAMPLE_FBS = 4
1919
ONNX_EXPORT_EXAMPLE_NLK = 2 # Number of Logits to Keep
20-
ONNX_EXPORT_OPSET = 13
20+
ONNX_EXPORT_OPSET = 17
2121
ONNX_EXPORT_MAX_NUM_IMAGES = 1
2222
ONNX_EXPORT_MAX_IMAGE_TILES = 4
2323
ONNX_EXPORT_IMAGE_WIDTH = 560
@@ -84,7 +84,7 @@ def get_models_dir():
8484
ONNX_EXPORT_EXAMPLE_MAX_TOP_K_IDS = 512
8585
ONNX_EXPORT_EXAMPLE_TOP_PS = 0.80
8686
ONNX_EXPORT_EXAMPLE_MIN_PS = 0.99
87-
ONNX_EXPORT_OPSET = 13
87+
ONNX_EXPORT_OPSET = 17
8888

8989
COMPILER = ["/opt/qti-aic/exec/qaic-exec", "-aic-hw"]
9090
DEFAULT_AIC_HW_VERSION = "ai100"

tests/conftest.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,11 @@
55
#
66
# -----------------------------------------------------------------------------
77

8-
import json
98
import os
109
import shutil
1110

12-
import pytest
13-
from transformers import AutoConfig
14-
1511
from QEfficient.utils.constants import QEFF_MODELS_DIR
1612
from QEfficient.utils.logging_utils import logger
17-
from QEfficient.utils.test_utils import ModelConfig
18-
19-
20-
def get_custom_model_config_dict(configs):
21-
"""
22-
Converts a list of custom model configuration dictionaries into a dictionary
23-
mapping model names to their corresponding AutoConfig objects.
24-
25-
Args:
26-
configs (List[Dict]): A list of dictionaries, each containing model configuration parameters.
27-
28-
Returns:
29-
Dict[str, AutoConfig]: A dictionary where keys are model names and values are AutoConfig objects.
30-
"""
31-
config_dict = {}
32-
for config in configs:
33-
model_name = config["model_name"]
34-
config_dict[model_name] = AutoConfig.from_pretrained(
35-
model_name,
36-
trust_remote_code=config["model_name"] in ModelConfig.EXTERNAL_MODELS,
37-
**config.get("additional_params", {}),
38-
)
39-
return config_dict
40-
41-
42-
# Pytest fixture to load custom model configs from a JSON file
43-
@pytest.fixture(scope="session")
44-
def custom_causal_model_config_dict():
45-
with open("tests/transformers/models/custom_tiny_model_configs.json", "r") as f:
46-
custom_model_configs_data = json.load(f)
47-
return get_custom_model_config_dict(custom_model_configs_data)
4813

4914

5015
def qeff_models_clean_up():

0 commit comments

Comments
 (0)