[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>
This commit is contained in:
Gyula Chinoradszki
2026-08-08 12:09:26 +08:00
committed by GitHub
co-authored by Cursor Agent
parent a828536fb5
commit d21fed9522
+9
View File
@@ -6,9 +6,18 @@ import os
import warnings
import torch
import torch.nn.functional as F
from vllm.platforms import current_platform
# openbmb/MiniCPM-Llama3-V-2_5's remote ``resampler.py`` annotates with ``List``
# without importing it, relying on the alias leaking from
# ``from torch.nn.functional import *``. Recent torch uses builtin generics and no
# longer re-exports the typing aliases, so executing that module raises NameError.
# TODO: Remove once the checkpoint fixes its imports.
if not hasattr(F, "List"):
F.List = list
def pytest_configure(config):
"""Early ROCm configuration that must happen before test collection."""