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

Commit

Permalink
[Bugfix] fix utils.py/merge_dict func TypeError: 'type' object is not…
Browse files Browse the repository at this point in the history
… subscriptable (vllm-project#3955)

Co-authored-by: tianyi_zhao <[email protected]>
  • Loading branch information
2 people authored and andy-neuma committed Apr 12, 2024
1 parent 733ab62 commit cea1ec9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from collections import OrderedDict, defaultdict
from functools import lru_cache, partial
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)

import psutil
Expand Down Expand Up @@ -452,8 +452,8 @@ def maybe_expand_dim(tensor: torch.Tensor,
return tensor


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

0 comments on commit cea1ec9

Please sign in to comment.