[Bugfix][models_multimodal] Remote HF python code misses importing class (#51427)
Signed-off-by: Gyula Chinoradszki <gchinora@amd.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Gyula Chinoradszki committed
Aug 8, 2026 at 06:09 UTC
d21fed95221a49d2023b3b105339864fdf81a0bb
1 file changed
+9
tests/models/multimodal/conftest.py
+9
@@ -6,9 +6,18 @@ import os
6
import warnings
7
8
import torch
9
+import torch.nn.functional as F
10
11
from vllm.platforms import current_platform
12
13
+# openbmb/MiniCPM-Llama3-V-2_5's remote ``resampler.py`` annotates with ``List``
14
+# without importing it, relying on the alias leaking from
15
+# ``from torch.nn.functional import *``. Recent torch uses builtin generics and no
16
+# longer re-exports the typing aliases, so executing that module raises NameError.
17
+# TODO: Remove once the checkpoint fixes its imports.
18
+if not hasattr(F, "List"):
19
+ F.List = list
20
+
21
22
def pytest_configure(config):
23
"""Early ROCm configuration that must happen before test collection."""