Skip to content

Commit

Permalink
Revert "Use custom unique test names for e2e tests (#892)" (#893)
Browse files Browse the repository at this point in the history
This reverts commit 10facf2.

Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
  • Loading branch information
dsikka authored and kylesayrs committed Nov 19, 2024
1 parent 37b8bbe commit 6b37f30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
17 changes: 2 additions & 15 deletions tests/e2e/vLLM/test_vllm.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import shutil
import unittest
from typing import Callable

import pytest
from datasets import load_dataset
from parameterized import parameterized, parameterized_class
from parameterized import parameterized_class
from transformers import AutoTokenizer

from llmcompressor.modifiers.quantization import QuantizationModifier
Expand Down Expand Up @@ -33,22 +32,10 @@
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", "").lower(),
]
)


@requires_gpu
@requires_torch
@pytest.mark.skipif(not vllm_installed, reason="vLLM is not installed, skipping test")
@parameterized_class(parse_params(CONFIGS), class_name_func=gen_test_name)
@parameterized_class(parse_params(CONFIGS))
class TestvLLM(unittest.TestCase):
"""
The following test quantizes a model using a preset scheme or recipe,
Expand Down
4 changes: 1 addition & 3 deletions tests/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ def _parse_configs_dir(current_config_dir):
), f"Config_directory {current_config_dir} is not a directory"

for file in os.listdir(current_config_dir):
config_path = os.path.join(current_config_dir, file)
config = _load_yaml(config_path)
config["testconfig_path"] = config_path
config = _load_yaml(os.path.join(current_config_dir, file))
if not config:
continue

Expand Down

0 comments on commit 6b37f30

Please sign in to comment.