Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions tests/unittest/_torch/modeling/test_modeling_qwen2_5vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import unittest
from copy import deepcopy
from dataclasses import dataclass
from pathlib import Path
from typing import List

import torch
Expand Down Expand Up @@ -106,20 +107,24 @@ def __repr__(self) -> str:
class TestQwen2_5_VL(unittest.TestCase):

def get_test_inputs(self, modality: str):

test_data_root = Path(
os.path.join(llm_models_root(), "multimodals", "test_data"))

if modality == "image":
return ["Describe the natural environment in the image."], \
["https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/seashore.png"]
[str(test_data_root / "seashore.png")]
elif modality == "multiple_image":
return ["Describe the difference between the two images."], \
["https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png",
"https://huggingface.co/datasets/Sayali9141/traffic_signal_images/resolve/main/61.jpg"]
[str(test_data_root / "inpaint.png"),
str(test_data_root / "61.jpg")]
elif modality == "video":
return ["Tell me what you see in the video briefly."], \
["https://huggingface.co/datasets/Efficient-Large-Model/VILA-inference-demos/resolve/main/OAI-sora-tokyo-walk.mp4"]
[str(test_data_root / "OAI-sora-tokyo-walk.mp4")]
elif modality == "mixture_text_image":
return ["Describe the scene in the image briefly.",
"Who invented the internet?"], \
["https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/inpaint.png",
[str(test_data_root / "inpaint.png"),
""]
Comment on lines 114 to 128
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify test data files exist at the specified paths.

The local filesystem paths look correctly constructed using Path. Ensure that the test data files (seashore.png, inpaint.png, 61.jpg, OAI-sora-tokyo-walk.mp4) exist in the <llm_models_root>/multimodals/test_data/ directory before running these tests.

Run this script to verify the test data files exist:


🏁 Script executed:

#!/bin/bash
# Description: Check if test data files exist at expected locations

# Determine LLM_MODELS_ROOT (respecting env var or using default)
LLM_MODELS_ROOT="${LLM_MODELS_ROOT:-/scratch.trt_llm_data/llm-models}"
TEST_DATA_DIR="$LLM_MODELS_ROOT/multimodals/test_data"

echo "Checking test data directory: $TEST_DATA_DIR"

# Check if directory exists
if [ ! -d "$TEST_DATA_DIR" ]; then
    echo "ERROR: Test data directory does not exist: $TEST_DATA_DIR"
    exit 1
fi

# Check each required file
files=("seashore.png" "inpaint.png" "61.jpg" "OAI-sora-tokyo-walk.mp4")
missing_files=()

for file in "${files[@]}"; do
    if [ ! -f "$TEST_DATA_DIR/$file" ]; then
        missing_files+=("$file")
    fi
done

if [ ${#missing_files[@]} -gt 0 ]; then
    echo "ERROR: Missing test data files:"
    printf '  - %s\n' "${missing_files[@]}"
    exit 1
else
    echo "SUCCESS: All required test data files exist"
    ls -lh "$TEST_DATA_DIR"
fi

Length of output: 182


Test data directory missing: tests will fail

The directory ${LLM_MODELS_ROOT}/multimodals/test_data (used by test_data_root in test_modeling_qwen2_5vl.py) does not exist. Add the multimodals/test_data folder with the required files or update test_data_root to point at the correct location before running these tests.

elif modality == "text":
return ["Who invented the internet?"], []
Expand Down