| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # SPDX-FileCopyrightText: Copyright contributors to the vLLM project |
| 3 | """Pytest configuration for vLLM multimodal tests.""" |
| 4 | |
| 5 | import torch.nn.functional as F |
| 6 | |
| 7 | # openbmb/MiniCPM-Llama3-V-2_5's remote ``resampler.py`` annotates with ``List`` |
| 8 | # without importing it, relying on the alias leaking from |
| 9 | # ``from torch.nn.functional import *``. Recent torch uses builtin generics and no |
| 10 | # longer re-exports the typing aliases, so executing that module raises NameError. |
| 11 | # TODO: Remove once the checkpoint fixes its imports. |
| 12 | if not hasattr(F, "List"): |
| 13 | F.List = list |