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
DarkLight1337 authored and Duyi-Wang committed May 22, 2024
1 parent 513598e commit fff064d
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

@@ -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

4 changes: 2 additions & 2 deletions vllm/entrypoints/openai/api_server.py
Original file line number Diff line number Diff line change
@@ -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
@@ -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

0 comments on commit fff064d

Please sign in to comment.