diff --git a/tests/e2e/vLLM/test_vllm.py b/tests/e2e/vLLM/test_vllm.py index f352a6772..bfd75afab 100644 --- a/tests/e2e/vLLM/test_vllm.py +++ b/tests/e2e/vLLM/test_vllm.py @@ -1,9 +1,10 @@ import shutil import unittest +from typing import Callable import pytest from datasets import load_dataset -from parameterized import parameterized_class +from parameterized import parameterized, parameterized_class from transformers import AutoTokenizer from llmcompressor.modifiers.quantization import QuantizationModifier @@ -32,10 +33,22 @@ CONFIGS = [WNA16, FP8, INT8, ACTORDER, WNA16_2of4] +def gen_test_name(testcase_func: Callable, param_num: int, param: dict) -> str: + return "-".join( + [ + testcase_func.__name__, + parameterized.to_safe_name( + param.get("testconfig_path", "").split("configs/")[-1] + ), + param.get("cadence", "").upper(), + ] + ) + + @requires_gpu @requires_torch @pytest.mark.skipif(not vllm_installed, reason="vLLM is not installed, skipping test") -@parameterized_class(parse_params(CONFIGS)) +@parameterized_class(parse_params(CONFIGS), class_name_func=gen_test_name) class TestvLLM(unittest.TestCase): """ The following test quantizes a model using a preset scheme or recipe,