Skip to content

Commit 8b1e8e7

Browse files
authored
[CI] Use real vLLM ModelConfig object in init_device test (#937)
Signed-off-by: Hongmin Fan <[email protected]>
1 parent b646922 commit 8b1e8e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/worker/tpu_worker_jax_test.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from unittest.mock import MagicMock, patch
22

33
import pytest
4+
from vllm.config import ModelConfig
45
from vllm.lora.request import LoRARequest
56
from vllm.v1.kv_cache_interface import KVCacheConfig
67
from vllm.v1.outputs import DraftTokenIds
@@ -27,9 +28,6 @@ def mock_vllm_config():
2728
This version builds the mock explicitly to avoid spec-related AttributeErrors.
2829
"""
2930
# Create mocks for the nested config objects first
30-
mock_model_conf = MagicMock()
31-
mock_model_conf.trust_remote_code = False
32-
3331
mock_cache_conf = MagicMock()
3432
mock_cache_conf.gpu_memory_utilization = 0.9
3533
mock_cache_conf.num_gpu_blocks = 0
@@ -43,7 +41,7 @@ def mock_vllm_config():
4341

4442
# Create the main config mock and attach the others without a top-level spec
4543
config = MagicMock()
46-
config.model_config = mock_model_conf
44+
config.model_config = ModelConfig(model="Qwen/Qwen3-0.6B")
4745
config.cache_config = mock_cache_conf
4846
config.parallel_config = mock_parallel_conf
4947
config.additional_config = mock_additional_config

0 commit comments

Comments
 (0)