Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] fix utils.py/merge_dict func TypeError: 'type' object is not subscriptable #3955

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from functools import lru_cache, partial
from platform import uname
from typing import (Any, Awaitable, Callable, Generic, Hashable, List,
Optional, Tuple, TypeVar, Union)
Optional, Tuple, TypeVar, Union, Dict)
WoosukKwon marked this conversation as resolved.
Show resolved Hide resolved

import psutil
import torch
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
Loading