Skip to content

Commit 286f414

Browse files
committed
Revert test file changes
Signed-off-by: Xing Liu <xingliu14@gmail.com>
1 parent 0830715 commit 286f414

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/e2e/test_data_parallel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
from dataclasses import asdict
77

88
import pytest
9-
import tpu_inference.envs as envs
109
from vllm import LLM, EngineArgs, SamplingParams
1110

1211

1312
@pytest.fixture(autouse=True)
1413
def setup_new_model_design():
1514
"""Automatically set NEW_MODEL_DESIGN=True for all tests."""
16-
os.environ['NEW_MODEL_DESIGN'] = '1'
15+
os.environ['NEW_MODEL_DESIGN'] = 'True'
1716

1817

1918
@pytest.fixture
@@ -174,8 +173,8 @@ def test_data_parallelism_correctness(
174173
This test compares outputs from a single-device run with data parallel runs
175174
to ensure correctness, including log probabilities.
176175
"""
177-
envs.environment_variables['SKIP_JAX_PRECOMPILE'] = lambda: True
178-
envs.environment_variables['VLLM_XLA_CHECK_RECOMPILATION'] = lambda: False
176+
os.environ['SKIP_JAX_PRECOMPILE'] = '1'
177+
os.environ['VLLM_XLA_CHECK_RECOMPILATION'] = '0'
179178
model_name = "Qwen/Qwen2.5-1.5B-Instruct"
180179
# Use a smaller subset of prompts for correctness testing
181180
small_prompts = test_prompts[:10]

tests/e2e/test_multi_modal_inference.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# This script is a self-contained test that runs a single prompt and
55
# compares the output to a known-good output.
66

7+
import os
78
from dataclasses import asdict
89

9-
import tpu_inference.envs as envs
1010
from vllm import LLM, EngineArgs, SamplingParams
1111
from vllm.assets.image import ImageAsset
1212
from vllm.multimodal.image import convert_image_mode
@@ -24,8 +24,9 @@ def test_multi_modal_inference(monkeypatch):
2424
"""
2525
Runs multi-modal inference and verifies the output.
2626
"""
27-
envs.environment_variables['SKIP_JAX_PRECOMPILE'] = lambda: True # Skip warmup to save time.
28-
envs.environment_variables['VLLM_XLA_CHECK_RECOMPILATION'] = lambda: False # Allow compilation during execution.
27+
os.environ['SKIP_JAX_PRECOMPILE'] = '1' # Skip warmup to save time.
28+
os.environ[
29+
'VLLM_XLA_CHECK_RECOMPILATION'] = '0' # Allow compilation during execution.
2930

3031
monkeypatch.setenv("VLLM_WORKER_MULTIPROC_METHOD", "spawn")
3132

0 commit comments

Comments
 (0)