Skip to content

Commit 9fc3417

Browse files
committed
Remove unnecessary env override since it is already set by the pipeline
1 parent 0ff27f2 commit 9fc3417

File tree

3 files changed

+5
-29
lines changed

3 files changed

+5
-29
lines changed

.buildkite/test-pipeline.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ steps:
4444
working_dir: "/vllm-workspace/tests"
4545
num_gpus: 2
4646
commands:
47+
- bash ../.buildkite/download-images.sh
4748
# FIXIT: find out which code initialize cuda before running the test
4849
# before the fix, we need to use spawn to test it
49-
- bash ../.buildkite/download-images.sh
5050
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
5151
- VLLM_TEST_SAME_HOST=1 torchrun --nproc-per-node=4 distributed/test_same_node.py
5252
- TEST_DIST_MODEL=facebook/opt-125m DISTRIBUTED_EXECUTOR_BACKEND=ray pytest -v -s distributed/test_basic_distributed_correctness.py

tests/distributed/test_multimodal_broadcast.py

+4-15
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
from vllm.utils import cuda_device_count_stateless
1919

20-
from ..utils import override_env
21-
2220
model = os.environ["TEST_DIST_MODEL"]
2321

2422
if model.startswith("llava-hf/llava"):
@@ -29,25 +27,16 @@
2927
raise NotImplementedError(f"Unsupported model: {model}")
3028

3129

32-
@pytest.fixture(scope="function", autouse=True)
33-
def tensor_parallel_ctx(tensor_parallel_size: int):
34-
if cuda_device_count_stateless() < tensor_parallel_size:
35-
pytest.skip(
36-
f"Need at least {tensor_parallel_size} GPUs to run the test.")
37-
38-
if tensor_parallel_size > 1:
39-
with override_env("VLLM_WORKER_MULTIPROC_METHOD", "spawn"):
40-
yield
41-
else:
42-
yield
43-
44-
4530
@pytest.mark.parametrize("tensor_parallel_size", [2])
4631
@pytest.mark.parametrize("dtype", ["half"])
4732
@pytest.mark.parametrize("max_tokens", [128])
4833
def test_models(hf_runner, vllm_runner, image_assets,
4934
tensor_parallel_size: int, dtype: str,
5035
max_tokens: int) -> None:
36+
if cuda_device_count_stateless() < tensor_parallel_size:
37+
pytest.skip(
38+
f"Need at least {tensor_parallel_size} GPUs to run the test.")
39+
5140
distributed_executor_backend = os.getenv("DISTRIBUTED_EXECUTOR_BACKEND")
5241

5342
run_test(

tests/utils.py

-13
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,3 @@ def wait_for_gpu_memory_to_clear(devices: List[int],
219219
f'{dur_s=:.02f} ({threshold_bytes/2**30=})')
220220

221221
time.sleep(5)
222-
223-
224-
@contextmanager
225-
def override_env(name: str, value: str):
226-
prev_value = os.environ.get(name)
227-
os.environ[name] = value
228-
229-
yield
230-
231-
if prev_value is None:
232-
del os.environ[name]
233-
else:
234-
os.environ[name] = prev_value

0 commit comments

Comments
 (0)