[CI] Mock spawn for vlm tests (#5279)
### What this PR does / why we need it?
Using `spawn` in continuous testing scenarios
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM version: release/v0.13.0
- vLLM main:
ad32e3e19c
---------
Signed-off-by: wangli <wangli858794774@gmail.com>
This commit is contained in:
3
.github/workflows/_e2e_test.yaml
vendored
3
.github/workflows/_e2e_test.yaml
vendored
@@ -86,6 +86,7 @@ jobs:
|
|||||||
- name: Run vllm-project/vllm-ascend test
|
- name: Run vllm-project/vllm-ascend test
|
||||||
env:
|
env:
|
||||||
PYTORCH_NPU_ALLOC_CONF: max_split_size_mb:256
|
PYTORCH_NPU_ALLOC_CONF: max_split_size_mb:256
|
||||||
|
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
||||||
if: ${{ inputs.type == 'light' }}
|
if: ${{ inputs.type == 'light' }}
|
||||||
run: |
|
run: |
|
||||||
# pytest -sv --durations=0 tests/e2e/singlecard/test_aclgraph_accuracy.py
|
# pytest -sv --durations=0 tests/e2e/singlecard/test_aclgraph_accuracy.py
|
||||||
@@ -177,6 +178,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Run vllm-project/vllm-ascend test (non triton)
|
- name: Run vllm-project/vllm-ascend test (non triton)
|
||||||
if: ${{ inputs.type == 'full' }}
|
if: ${{ inputs.type == 'full' }}
|
||||||
|
env:
|
||||||
|
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
||||||
run: |
|
run: |
|
||||||
pytest -sv --durations=0 tests/e2e/multicard/test_aclgraph_capture_replay.py
|
pytest -sv --durations=0 tests/e2e/multicard/test_aclgraph_capture_replay.py
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
Run `pytest tests/test_offline_inference.py`.
|
Run `pytest tests/test_offline_inference.py`.
|
||||||
"""
|
"""
|
||||||
|
import os
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
from vllm import SamplingParams
|
from vllm import SamplingParams
|
||||||
from vllm.assets.audio import AudioAsset
|
from vllm.assets.audio import AudioAsset
|
||||||
from vllm.assets.image import ImageAsset
|
from vllm.assets.image import ImageAsset
|
||||||
@@ -27,6 +30,7 @@ from vllm.assets.image import ImageAsset
|
|||||||
from tests.e2e.conftest import VllmRunner
|
from tests.e2e.conftest import VllmRunner
|
||||||
|
|
||||||
|
|
||||||
|
@patch.dict(os.environ, {"VLLM_WORKER_MULTIPROC_METHOD": "spawn"})
|
||||||
def test_multimodal_vl(vl_config):
|
def test_multimodal_vl(vl_config):
|
||||||
image = ImageAsset("cherry_blossom").pil_image.convert("RGB")
|
image = ImageAsset("cherry_blossom").pil_image.convert("RGB")
|
||||||
|
|
||||||
@@ -57,6 +61,7 @@ def test_multimodal_vl(vl_config):
|
|||||||
assert output_str, "Generated output should not be empty."
|
assert output_str, "Generated output should not be empty."
|
||||||
|
|
||||||
|
|
||||||
|
@patch.dict(os.environ, {"VLLM_WORKER_MULTIPROC_METHOD": "spawn"})
|
||||||
def test_multimodal_audio():
|
def test_multimodal_audio():
|
||||||
audio_prompt = "".join([
|
audio_prompt = "".join([
|
||||||
f"Audio {idx+1}: <|audio_bos|><|AUDIO|><|audio_eos|>\n"
|
f"Audio {idx+1}: <|audio_bos|><|AUDIO|><|audio_eos|>\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user