Skip to content

Commit

Permalink
[Bugfix] Fix asyncio.Task not being subscriptable (#4623)
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 authored and joerunde committed May 6, 2024
1 parent 352ef7c commit 06241cf
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 @@ -5,7 +5,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 @@ -38,7 +38,7 @@
async_llm_engine: AsyncLLMEngine
logger = init_logger(__name__)

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


@asynccontextmanager
Expand Down

0 comments on commit 06241cf

Please sign in to comment.