Skip to content

Commit a6017f6

Browse files
[https://nvbugs/5608723][fix] Use local data on multimodal tests and unwaive tests (#8673)
Signed-off-by: yechank <161688079+yechank-nvidia@users.noreply.github.com>
1 parent 73a5479 commit a6017f6

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

tests/integration/defs/test_e2e.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,6 @@ def test_openai_lora(llm_root, llm_venv):
16651665
llm_venv.run_cmd(["-m", "pytest", str(test_root / "_test_openai_lora.py")])
16661666

16671667

1668-
@pytest.mark.skip(reason="https://nvbugs/5596377")
16691668
def test_openai_chat_multimodal_example(llm_root, llm_venv):
16701669
test_root = unittest_path() / "llmapi" / "apps"
16711670
llm_venv.run_cmd(

tests/unittest/_torch/modeling/test_modeling_qwen2_5vl.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from pathlib import Path
66
from typing import List
77

8-
import pytest
98
import torch
109
from _torch.helpers import create_mock_engine
1110
from parameterized import parameterized
1211
from transformers import AutoProcessor, AutoTokenizer, Qwen2_5_VLConfig
1312
from transformers import \
1413
Qwen2_5_VLForConditionalGeneration as HFQwen2_5_VLForConditionalLM
14+
from utils.llm_data import llm_models_root
1515

1616
import tensorrt_llm
1717
from tensorrt_llm._torch.attention_backend.utils import get_attention_backend
@@ -28,16 +28,6 @@
2828
from tensorrt_llm.inputs.multimodal import MultimodalParams
2929
from tensorrt_llm.mapping import Mapping
3030

31-
32-
def llm_models_root() -> str:
33-
'''return LLM_MODELS_ROOT path if it is set in env, assert when it's set but not a valid path
34-
'''
35-
DEFAULT_LLM_MODEL_ROOT = os.path.join("/scratch.trt_llm_data", "llm-models")
36-
LLM_MODELS_ROOT = os.environ.get("LLM_MODELS_ROOT", DEFAULT_LLM_MODEL_ROOT)
37-
38-
return LLM_MODELS_ROOT
39-
40-
4131
QWEN2_5_VL_7B_CONFIG = {
4232
"architectures": ["Qwen2_5_VLForConditionalGeneration"],
4333
"attention_dropout": 0.0,
@@ -222,7 +212,8 @@ def get_hf_inputs(self, model, modality: str, device: torch.device,
222212
images = [input['multi_modal_data']['image'] for input in inputs]
223213
elif modality == "video":
224214
videos = [
225-
input['multi_modal_data'][f'{modality}'] for input in inputs
215+
input['multi_modal_data'][f'{modality}'][0].frames
216+
for input in inputs
226217
]
227218
elif modality == "text":
228219
# For text-only modality, no images or videos needed
@@ -240,7 +231,6 @@ def get_hf_inputs(self, model, modality: str, device: torch.device,
240231
).to(device)
241232
return processor_inputs
242233

243-
@pytest.mark.skip(reason="https://nvbugs/5550722")
244234
def test_qwen2_5_vl_sanity(self):
245235

246236
config_dict = deepcopy(QWEN2_5_VL_7B_CONFIG)
@@ -359,7 +349,6 @@ def test_qwen2_5_vl_sanity(self):
359349
use_cuda_graph=False,
360350
disable_fuse_rope=False),
361351
])
362-
@pytest.mark.skip(reason="https://nvbugs/5550722")
363352
@torch.no_grad()
364353
def test_qwen2_5_vl_allclose_to_hf(self, scenario: Scenario) -> None:
365354
"""

tests/unittest/_torch/multimodal/test_mm_encoder_standalone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_multi_request_batch_chat(model_key, multimodal_model_config):
177177
f"Skipping test for {model_key} - only testing llava-v1.6-mistral-7b-hf for now"
178178
)
179179

180-
encoder_model_dir = multimodal_model_config['hf_model_dir']
180+
encoder_model_dir = multimodal_model_config['model_dir']
181181

182182
max_tokens = 64
183183
free_gpu_memory_fraction = 0.6

0 commit comments

Comments
 (0)