2024-05-19 15:13:33 +08:00
|
|
|
import pytest
|
2024-09-12 00:31:19 +08:00
|
|
|
import transformers
|
2024-05-19 15:13:33 +08:00
|
|
|
|
|
|
|
from vllm.model_executor.models import _MODELS, ModelRegistry
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize("model_cls", _MODELS)
|
|
|
|
def test_registry_imports(model_cls):
|
2024-09-23 01:51:44 +08:00
|
|
|
if (model_cls in ("LlavaOnevisionForConditionalGeneration",
|
|
|
|
"Qwen2VLForConditionalGeneration")
|
2024-09-12 00:31:19 +08:00
|
|
|
and transformers.__version__ < "4.45"):
|
|
|
|
pytest.skip("Waiting for next transformers release")
|
|
|
|
|
2024-05-19 15:13:33 +08:00
|
|
|
# Ensure all model classes can be imported successfully
|
2024-08-06 16:55:31 +08:00
|
|
|
ModelRegistry.resolve_model_cls([model_cls])
|