mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 20:45:15 +08:00
[Bugfix] fix utils.py/merge_dict func TypeError: 'type' object is not subscriptable (#3955)
Co-authored-by: tianyi_zhao <tianyi.zhao@transwarp.io>
This commit is contained in:
parent
c013d32c75
commit
c2e00af523
@ -9,7 +9,7 @@ import warnings
|
|||||||
from collections import OrderedDict, defaultdict
|
from collections import OrderedDict, defaultdict
|
||||||
from functools import lru_cache, partial
|
from functools import lru_cache, partial
|
||||||
from platform import uname
|
from platform import uname
|
||||||
from typing import (Any, Awaitable, Callable, Generic, Hashable, List,
|
from typing import (Any, Awaitable, Callable, Dict, Generic, Hashable, List,
|
||||||
Optional, Tuple, TypeVar, Union)
|
Optional, Tuple, TypeVar, Union)
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
@ -452,8 +452,8 @@ def maybe_expand_dim(tensor: torch.Tensor,
|
|||||||
return tensor
|
return tensor
|
||||||
|
|
||||||
|
|
||||||
def merge_dicts(dict1: dict[Any, list[Any]],
|
def merge_dicts(dict1: Dict[Any, List[Any]],
|
||||||
dict2: dict[Any, list[Any]]) -> dict[Any, list[Any]]:
|
dict2: Dict[Any, List[Any]]) -> Dict[Any, List[Any]]:
|
||||||
"""Merge 2 dicts that have key -> List of items.
|
"""Merge 2 dicts that have key -> List of items.
|
||||||
|
|
||||||
When a key conflicts, the values in dict1 is prioritized.
|
When a key conflicts, the values in dict1 is prioritized.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user