Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
handled skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgshaw2-redhat committed Jun 25, 2024
1 parent 9d7b7b5 commit 3a75e15
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions neuralmagic/tests/test_skip_env_vars/full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ TEST_SAMPLERS=ENABLE
TEST_SPEC_DECODE=DISABLE
TEST_TENSORIZER_LOADER=ENABLE
TEST_TOKENIZATION=ENABLE
TEST_TRACING=ENABLE
TEST_WORKER=ENABLE
1 change: 1 addition & 0 deletions neuralmagic/tests/test_skip_env_vars/smoke.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ TEST_SAMPLERS=DISABLE
TEST_SPEC_DECODE=DISABLE
TEST_TENSORIZER_LOADER=DISABLE
TEST_TOKENIZATION=ENABLE
TEST_TRACING=ENABLE
TEST_WORKER=ENABLE
5 changes: 5 additions & 0 deletions tests/models/test_phi3v.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
import pytest
from transformers import AutoTokenizer

from tests.nm_utils.utils_skip import should_skip_test_group
from vllm.config import VisionLanguageConfig
from vllm.utils import is_cpu

from ..conftest import IMAGE_FILES

if should_skip_test_group(group_name="TEST_MODELS"):
pytest.skip("TEST_MODELS=DISABLE, skipping models test group",
allow_module_level=True)

pytestmark = pytest.mark.vlm

# The image token is placed before "user" on purpose so that the test can pass
Expand Down
6 changes: 6 additions & 0 deletions tests/nm_utils/utils_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ def should_skip_tokenization_test_group():
return TEST_TOKENIZATION == "DISABLE"


def should_skip_tracing_test_group():
TEST_TRACING = os.getenv("TEST_TRACING", "ENABLE")
return TEST_TRACING == "DISABLE"


def should_skip_worker_test_group():
TEST_WORKER = os.getenv("TEST_WORKER", "ENABLE")
return TEST_WORKER == "DISABLE"
Expand All @@ -126,6 +131,7 @@ def should_skip_worker_test_group():
"TEST_SPEC_DECODE": should_skip_spec_decode_test_group,
"TEST_TENSORIZER_LOADER": should_skip_tensorizer_loader_test_group,
"TEST_TOKENIZATION": should_skip_tokenization_test_group,
"TEST_TRACING": should_skip_tracing_test_group,
"TEST_WORKER": should_skip_worker_test_group,
}

Expand Down
5 changes: 5 additions & 0 deletions tests/samplers/test_typical_acceptance_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
import pytest
import torch

from tests.nm_utils.utils_skip import should_skip_test_group
from vllm.model_executor.layers.typical_acceptance_sampler import (
TypicalAcceptanceSampler)
from vllm.model_executor.utils import set_random_seed

if should_skip_test_group(group_name="TEST_SAMPLERS"):
pytest.skip("TEST_SAMPLERS=DISABLE, skipping sampler test group",
allow_module_level=True)

CUDA_DEVICES = [f"cuda:{i}" for i in range(1)]


Expand Down
6 changes: 6 additions & 0 deletions tests/tracing/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_TRACES_INSECURE)

from tests.nm_utils.utils_skip import should_skip_test_group

if should_skip_test_group(group_name="TEST_TRACING"):
pytest.skip("TEST_TRACING=DISABLE, skipping tracing test group",
allow_module_level=True)

from vllm import LLM, SamplingParams
from vllm.tracing import SpanAttributes

Expand Down

0 comments on commit 3a75e15

Please sign in to comment.