Add vLLM v0.18.1 source tree with KV transfer abort fix
third_party/vllm/ now tracked in git for direct patch management.
Based on vLLM v0.18.1 release with one patch applied:
vllm/v1/core/sched/scheduler.py:
Replace fatal assert with graceful skip when KV transfer callback
arrives for an already-aborted request during PD disaggregated serving.
Future vLLM modifications should be made directly in third_party/vllm/
and committed normally. The patches/ directory is kept as documentation
of what changed from upstream.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
third_party/vllm/tests/multimodal/test_image.py
vendored
Normal file
40
third_party/vllm/tests/multimodal/test_image.py
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import pytest
|
||||
from PIL import Image, ImageChops
|
||||
|
||||
from vllm.multimodal.image import convert_image_mode
|
||||
|
||||
pytestmark = pytest.mark.cpu_test
|
||||
|
||||
ASSETS_DIR = Path(__file__).parent / "assets"
|
||||
assert ASSETS_DIR.exists()
|
||||
|
||||
|
||||
def test_rgb_to_rgb():
|
||||
# Start with an RGB image.
|
||||
original_image = Image.open(ASSETS_DIR / "image1.png").convert("RGB")
|
||||
converted_image = convert_image_mode(original_image, "RGB")
|
||||
|
||||
# RGB to RGB should be a no-op.
|
||||
diff = ImageChops.difference(original_image, converted_image)
|
||||
assert diff.getbbox() is None
|
||||
|
||||
|
||||
def test_rgba_to_rgb():
|
||||
original_image = Image.open(ASSETS_DIR / "rgba.png")
|
||||
original_image_numpy = np.array(original_image)
|
||||
|
||||
converted_image = convert_image_mode(original_image, "RGB")
|
||||
converted_image_numpy = np.array(converted_image)
|
||||
|
||||
for i in range(original_image_numpy.shape[0]):
|
||||
for j in range(original_image_numpy.shape[1]):
|
||||
# Verify that all transparent pixels are converted to white.
|
||||
if original_image_numpy[i][j][3] == 0:
|
||||
assert converted_image_numpy[i][j][0] == 255
|
||||
assert converted_image_numpy[i][j][1] == 255
|
||||
assert converted_image_numpy[i][j][2] == 255
|
||||
Reference in New Issue
Block a user