[Frontend][EPD] Use JSON arrays for multimodal metadata (#56090)
Signed-off-by: Tianyu Guo <guoty@inferact.ai>
This commit is contained in:
@@ -2,7 +2,31 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
import pytest
|
||||
|
||||
from vllm.utils.collection_utils import common_prefix, swap_dict_values
|
||||
from vllm.utils.collection_utils import (
|
||||
common_prefix,
|
||||
is_list_of_numbers,
|
||||
swap_dict_values,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"value,expected",
|
||||
[
|
||||
([], True),
|
||||
([1, -2, 2**1024], True),
|
||||
([1, 0.5], True),
|
||||
([1, True], False),
|
||||
([1, float("nan")], False),
|
||||
([1, float("inf")], False),
|
||||
([1, -float("inf")], False),
|
||||
([1, "2"], False),
|
||||
([[1]], False),
|
||||
((1, 2), False),
|
||||
(None, False),
|
||||
],
|
||||
)
|
||||
def test_is_list_of_numbers_checks_all_finite_non_boolean_items(value, expected):
|
||||
assert is_list_of_numbers(value) is expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user