Skip to content

Commit 7ce90fd

Browse files
DarkLight1337fialhocoelho
authored andcommitted
[CI/Build] Remove "boardwalk" image asset (vllm-project#6460)
1 parent d49020b commit 7ce90fd

File tree

7 files changed

+12
-28
lines changed

7 files changed

+12
-28
lines changed

tests/conftest.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def _read_prompts(filename: str) -> List[str]:
3939
class _ImageAssetPrompts(TypedDict):
4040
stop_sign: str
4141
cherry_blossom: str
42-
boardwalk: str
4342

4443

4544
if sys.version_info < (3, 9):
@@ -58,7 +57,6 @@ def __init__(self) -> None:
5857
super().__init__([
5958
ImageAsset("stop_sign"),
6059
ImageAsset("cherry_blossom"),
61-
ImageAsset("boardwalk")
6260
])
6361

6462
def prompts(self, prompts: _ImageAssetPrompts) -> List[str]:
@@ -68,10 +66,7 @@ def prompts(self, prompts: _ImageAssetPrompts) -> List[str]:
6866
The order of the returned prompts matches the order of the
6967
assets when iterating through this object.
7068
"""
71-
return [
72-
prompts["stop_sign"], prompts["cherry_blossom"],
73-
prompts["boardwalk"]
74-
]
69+
return [prompts["stop_sign"], prompts["cherry_blossom"]]
7570

7671

7772
IMAGE_ASSETS = _ImageAssets()

tests/models/test_fuyu.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
pytestmark = pytest.mark.vlm
1313

1414
HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts({
15-
"stop_sign": "What's the content of the image?\n", # noqa: E501
16-
"cherry_blossom": "What is the season?\n",
17-
"boardwalk": "What's in this image?\n",
15+
"stop_sign":
16+
"What's the content of the image?\n",
17+
"cherry_blossom":
18+
"What is the season?\n",
1819
})
1920

2021
models = ["adept/fuyu-8b"]

tests/models/test_llava.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
"USER: <image>\nWhat's the content of the image?\nASSISTANT:",
1717
"cherry_blossom":
1818
"USER: <image>\nWhat is the season?\nASSISTANT:",
19-
"boardwalk":
20-
"USER: <image>\nWhat's in this image?\nASSISTANT:",
2119
})
2220

2321
IMAGE_TOKEN_ID = 32000

tests/models/test_llava_next.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
f"{_PREFACE} USER: <image>\nWhat's the content of the image? ASSISTANT:",
2424
"cherry_blossom":
2525
f"{_PREFACE} USER: <image>\nWhat is the season? ASSISTANT:",
26-
"boardwalk":
27-
f"{_PREFACE} USER: <image>\nWhat's in this image? ASSISTANT:",
2826
})
2927

3028
IMAGE_TOKEN_ID = 32000

tests/models/test_paligemma.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
pytestmark = pytest.mark.vlm
1313

1414
HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts({
15-
"stop_sign": "caption es",
16-
"cherry_blossom": "What is in the picture?",
17-
"boardwalk": "What is in the picture?",
15+
"stop_sign":
16+
"caption es",
17+
"cherry_blossom":
18+
"What is in the picture?",
1819
})
1920

2021
IMAGE_TOKEN_ID = 257152

tests/models/test_phi3v.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
"<|user|>\n<|image_1|>\nWhat's the content of the image?<|end|>\n<|assistant|>\n", # noqa: E501
1919
"cherry_blossom":
2020
"<|user|>\n<|image_1|>\nWhat is the season?<|end|>\n<|assistant|>\n",
21-
"boardwalk":
22-
"<|user|>\n<|image_1|>\nWhat's in this image?<|end|>\n<|assistant|>\n",
2321
})
2422

2523
models = ["microsoft/Phi-3-vision-128k-instruct"]

vllm/assets/image.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import shutil
22
from dataclasses import dataclass
3-
from functools import cached_property, lru_cache
3+
from functools import lru_cache
44
from typing import Literal
55

66
import requests
77
from PIL import Image
88

9-
from vllm.multimodal.utils import fetch_image
10-
119
from .base import get_cache_dir
1210

1311

@@ -35,13 +33,8 @@ def get_air_example_data_2_asset(filename: str) -> Image.Image:
3533

3634
@dataclass(frozen=True)
3735
class ImageAsset:
38-
name: Literal["stop_sign", "cherry_blossom", "boardwalk"]
36+
name: Literal["stop_sign", "cherry_blossom"]
3937

40-
@cached_property
38+
@property
4139
def pil_image(self) -> Image.Image:
42-
if self.name == "boardwalk":
43-
return fetch_image(
44-
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
45-
)
46-
4740
return get_air_example_data_2_asset(f"{self.name}.jpg")

0 commit comments

Comments
 (0)