Skip to content

Commit

Permalink
Use custom unique names for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarbuzzi committed Nov 4, 2024
1 parent 8a4cb64 commit e0d493a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/e2e/vLLM/test_vllm.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit e0d493a

Please sign in to comment.