"tests/vscode:/vscode.git/clone" did not exist on "3badb0213b11dcd74db85dea04b883f3391c47a7"
Commit 4c8e606b authored by zhuwenwen's avatar zhuwenwen
Browse files

update tests

parent 77ae0f0d
...@@ -12,12 +12,20 @@ from ...utils import RemoteOpenAIServer, models_path_prefix ...@@ -12,12 +12,20 @@ from ...utils import RemoteOpenAIServer, models_path_prefix
MODEL_NAME = os.path.join(models_path_prefix, "microsoft/Phi-3.5-vision-instruct") MODEL_NAME = os.path.join(models_path_prefix, "microsoft/Phi-3.5-vision-instruct")
MAXIMUM_IMAGES = 2 MAXIMUM_IMAGES = 2
# Test different image extensions (JPG/PNG) and formats (gray/RGB/RGBA) # Test different image extensions (JPG/PNG) and formats (gray/RGB/RGBA)
# TEST_IMAGE_URLS = [
# "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
# "https://upload.wikimedia.org/wikipedia/commons/f/fa/Grayscale_8bits_palette_sample_image.png",
# "https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Venn_diagram_rgb.svg/1280px-Venn_diagram_rgb.svg.png",
# "https://upload.wikimedia.org/wikipedia/commons/0/0b/RGBA_comp.png",
# ]
TEST_IMAGE_URLS = [ TEST_IMAGE_URLS = [
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg", os.path.join(models_path_prefix, "vision/nature_boardwalk.jpg"),
"https://upload.wikimedia.org/wikipedia/commons/f/fa/Grayscale_8bits_palette_sample_image.png", os.path.join(models_path_prefix, "vision/Grayscale_8bits_palette_sample_image.png"),
"https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Venn_diagram_rgb.svg/1280px-Venn_diagram_rgb.svg.png", os.path.join(models_path_prefix, "vision/1280px-Venn_diagram_rgb.svg.png"),
"https://upload.wikimedia.org/wikipedia/commons/0/0b/RGBA_comp.png", os.path.join(models_path_prefix, "vision/RGBA_comp.png"),
] ]
......
...@@ -8,7 +8,7 @@ from PIL.Image import Image ...@@ -8,7 +8,7 @@ from PIL.Image import Image
from transformers import AutoConfig from transformers import AutoConfig
from vllm.multimodal.utils import rescale_image_size from vllm.multimodal.utils import rescale_image_size
from vllm.utils import is_cpu from vllm.utils import is_cpu, is_hip
from ....conftest import (IMAGE_ASSETS, HfRunner, PromptImageInput, VllmRunner, from ....conftest import (IMAGE_ASSETS, HfRunner, PromptImageInput, VllmRunner,
_ImageAssets) _ImageAssets)
...@@ -367,7 +367,7 @@ def test_different_num_patches(hf_runner, vllm_runner, image_assets, model, ...@@ -367,7 +367,7 @@ def test_different_num_patches(hf_runner, vllm_runner, image_assets, model,
@pytest.mark.parametrize( @pytest.mark.parametrize(
"models", [(os.path.join(models_path_prefix, "OpenGVLab/InternVL2-2B"), os.path.join(models_path_prefix, "OpenGVLab/InternVL2-2B-AWQ"))]) "models", [(os.path.join(models_path_prefix, "OpenGVLab/InternVL2-2B"), os.path.join(models_path_prefix, "OpenGVLab/InternVL2-2B-AWQ") if not is_hip() else [])])
@pytest.mark.parametrize( @pytest.mark.parametrize(
"size_factors", "size_factors",
[ [
......
...@@ -14,6 +14,7 @@ from ....conftest import IMAGE_ASSETS, HfRunner, VllmRunner ...@@ -14,6 +14,7 @@ from ....conftest import IMAGE_ASSETS, HfRunner, VllmRunner
from ...utils import check_logprobs_close from ...utils import check_logprobs_close
from ....utils import models_path_prefix from ....utils import models_path_prefix
# The image token is placed before "user" on purpose so that the test can pass # The image token is placed before "user" on purpose so that the test can pass
HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts({ HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts({
"stop_sign": "stop_sign":
......
...@@ -5,6 +5,7 @@ import vllm ...@@ -5,6 +5,7 @@ import vllm
from vllm.prompt_adapter.request import PromptAdapterRequest from vllm.prompt_adapter.request import PromptAdapterRequest
from ..utils import models_path_prefix from ..utils import models_path_prefix
MODEL_PATH = os.path.join(models_path_prefix, "bigscience/bloomz-560m") MODEL_PATH = os.path.join(models_path_prefix, "bigscience/bloomz-560m")
PA_PATH = os.path.join(models_path_prefix, 'stevhliu/bloomz-560m_PROMPT_TUNING_CAUSAL_LM') PA_PATH = os.path.join(models_path_prefix, 'stevhliu/bloomz-560m_PROMPT_TUNING_CAUSAL_LM')
......
...@@ -3,6 +3,7 @@ from vllm.prompt_adapter.request import PromptAdapterRequest ...@@ -3,6 +3,7 @@ from vllm.prompt_adapter.request import PromptAdapterRequest
from ..utils import models_path_prefix from ..utils import models_path_prefix
import os import os
MODEL_PATH = os.path.join(models_path_prefix, "bigscience/bloomz-560m") MODEL_PATH = os.path.join(models_path_prefix, "bigscience/bloomz-560m")
pa_path = os.path.join(models_path_prefix, 'stevhliu/bloomz-560m_PROMPT_TUNING_CAUSAL_LM') pa_path = os.path.join(models_path_prefix, 'stevhliu/bloomz-560m_PROMPT_TUNING_CAUSAL_LM')
pa_path2 = os.path.join(models_path_prefix, 'swapnilbp/angry_tweet_ptune') pa_path2 = os.path.join(models_path_prefix, 'swapnilbp/angry_tweet_ptune')
......
...@@ -6,6 +6,7 @@ from vllm.prompt_adapter.request import PromptAdapterRequest ...@@ -6,6 +6,7 @@ from vllm.prompt_adapter.request import PromptAdapterRequest
from ..utils import models_path_prefix from ..utils import models_path_prefix
import os import os
MODEL_PATH = os.path.join(models_path_prefix, "meta-llama/Llama-2-7b-hf") MODEL_PATH = os.path.join(models_path_prefix, "meta-llama/Llama-2-7b-hf")
# pa_path = snapshot_download(repo_id="swapnilbp/llama_tweet_ptune") # pa_path = snapshot_download(repo_id="swapnilbp/llama_tweet_ptune")
# lora_path = snapshot_download(repo_id="yard1/llama-2-7b-sql-lora-test") # lora_path = snapshot_download(repo_id="yard1/llama-2-7b-sql-lora-test")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment