Skip to content

Commit

Permalink
[Bugfix] Fix asyncio.Task not being subscriptable (vllm-project#4623)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 authored May 6, 2024
1 parent 0650e59 commit 323f27b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions vllm/engine/async_llm_engine.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import asyncio
import time
from functools import partial
from typing import (Any, AsyncIterator, Callable, Dict, Iterable, List,
Optional, Set, Tuple, Type, Union)
from typing import (AsyncIterator, Callable, Dict, Iterable, List, Optional,
Set, Tuple, Type, Union)

from transformers import PreTrainedTokenizer

Expand Down Expand Up @@ -327,7 +327,7 @@ def __init__(self,
# We need to keep a reference to unshielded
# task as well to prevent it from being garbage
# collected
self._background_loop_unshielded: Optional[asyncio.Task[Any]] = None
self._background_loop_unshielded: Optional[asyncio.Task] = None
self.start_engine_loop = start_engine_loop
self._errored_with: Optional[BaseException] = None

Expand Down
4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import re
from contextlib import asynccontextmanager
from http import HTTPStatus
from typing import Any, Set
from typing import Set

import fastapi
import uvicorn
Expand Down Expand Up @@ -34,7 +34,7 @@
openai_serving_completion: OpenAIServingCompletion
logger = init_logger(__name__)

_running_tasks: Set[asyncio.Task[Any]] = set()
_running_tasks: Set[asyncio.Task] = set()


@asynccontextmanager
Expand Down

0 comments on commit 323f27b

Please sign in to comment.