Skip to content

Commit ce8952f

Browse files
committed
[Misc] Move utils to avoid conflicts with stdlib
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
1 parent 7a6c8c3 commit ce8952f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+50
-50
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
from vllm.outputs import RequestOutput
6161
from vllm.sampling_params import BeamSearchParams
6262
from vllm.transformers_utils.utils import maybe_model_redirect
63-
from vllm.utils.collections import is_list_of
63+
from vllm.utils.collection_utils import is_list_of
6464
from vllm.utils.torch_utils import set_default_torch_num_threads
6565

6666
logger = init_logger(__name__)

tests/lora/test_add_lora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from vllm.inputs import TextPrompt
1313
from vllm.lora.request import LoRARequest
1414
from vllm.sampling_params import SamplingParams
15-
from vllm.utils.asyncio import merge_async_iterators
15+
from vllm.utils.async_utils import merge_async_iterators
1616

1717
MODEL_PATH = "zai-org/chatglm3-6b"
1818
LORA_RANK = 64

tests/models/multimodal/generation/test_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
)
1818

1919
from vllm.platforms import current_platform
20-
from vllm.utils.functools import identity
20+
from vllm.utils.func_utils import identity
2121

2222
from ....conftest import (
2323
IMAGE_ASSETS,

tests/models/multimodal/generation/vlm_utils/model_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from transformers.video_utils import VideoMetadata
2626

2727
from vllm.logprobs import SampleLogprobs
28-
from vllm.utils.collections import is_list_of
28+
from vllm.utils.collection_utils import is_list_of
2929

3030
from .....conftest import HfRunner, ImageAsset, ImageTestAssets
3131
from .types import RunnerOutput

tests/models/multimodal/processing/test_tensor_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from vllm.multimodal.processing import BaseMultiModalProcessor, InputProcessingContext
3535
from vllm.multimodal.utils import group_mm_kwargs_by_modality
3636
from vllm.transformers_utils.tokenizer import cached_tokenizer_from_config
37-
from vllm.utils.collections import is_list_of
37+
from vllm.utils.collection_utils import is_list_of
3838
from vllm.utils.torch_utils import set_default_torch_dtype
3939

4040
from ...registry import _MULTIMODAL_EXAMPLE_MODELS, HF_EXAMPLE_MODELS

tests/utils_/test_async_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pytest
77

8-
from vllm.utils.asyncio import merge_async_iterators
8+
from vllm.utils.async_utils import merge_async_iterators
99

1010

1111
async def _mock_async_iterator(idx: int):

tests/utils_/test_collections.py renamed to tests/utils_/test_collection_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
import pytest
44

5-
from vllm.utils.collections import swap_dict_values
5+
from vllm.utils.collection_utils import swap_dict_values
66

77

88
@pytest.mark.parametrize(

tests/utils_/test_func_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66

7-
from vllm.utils.functools import deprecate_kwargs, supports_kw
7+
from vllm.utils.func_utils import deprecate_kwargs, supports_kw
88

99
from ..utils import error_on_warning
1010

vllm/benchmarks/throughput.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
from vllm.lora.request import LoRARequest
3535
from vllm.outputs import RequestOutput
3636
from vllm.sampling_params import BeamSearchParams
37-
from vllm.utils.asyncio import merge_async_iterators
37+
from vllm.utils.async_utils import merge_async_iterators
3838

3939

4040
def run_vllm(

vllm/entrypoints/chat_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
from vllm.transformers_utils.processor import cached_get_processor
5252
from vllm.transformers_utils.tokenizer import AnyTokenizer, MistralTokenizer
5353
from vllm.utils import random_uuid
54-
from vllm.utils.functools import supports_kw
54+
from vllm.utils.func_utils import supports_kw
5555

5656
logger = init_logger(__name__)
5757

0 commit comments

Comments
 (0)