Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit cea1ec9

Browse files
zhaotyertianyi_zhao
authored andcommitted
[Bugfix] fix utils.py/merge_dict func TypeError: 'type' object is not subscriptable (vllm-project#3955)
Co-authored-by: tianyi_zhao <[email protected]>
1 parent 733ab62 commit cea1ec9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vllm/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from collections import OrderedDict, defaultdict
1010
from functools import lru_cache, partial
1111
from platform import uname
12-
from typing import (Any, Awaitable, Callable, Generic, Hashable, List,
12+
from typing import (Any, Awaitable, Callable, Dict, Generic, Hashable, List,
1313
Optional, Tuple, TypeVar, Union)
1414

1515
import psutil
@@ -452,8 +452,8 @@ def maybe_expand_dim(tensor: torch.Tensor,
452452
return tensor
453453

454454

455-
def merge_dicts(dict1: dict[Any, list[Any]],
456-
dict2: dict[Any, list[Any]]) -> dict[Any, list[Any]]:
455+
def merge_dicts(dict1: Dict[Any, List[Any]],
456+
dict2: Dict[Any, List[Any]]) -> Dict[Any, List[Any]]:
457457
"""Merge 2 dicts that have key -> List of items.
458458
459459
When a key conflicts, the values in dict1 is prioritized.

0 commit comments

Comments
 (0)