Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
6774bd50
Unverified
Commit
6774bd50
authored
Dec 14, 2023
by
mezuzza
Committed by
GitHub
Dec 14, 2023
Browse files
Fix typing in AsyncLLMEngine & add toml to requirements-dev (#2100)
parent
31c1f325
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
requirements-dev.txt
requirements-dev.txt
+1
-0
vllm/engine/async_llm_engine.py
vllm/engine/async_llm_engine.py
+7
-6
No files found.
requirements-dev.txt
View file @
6774bd50
# formatting
# formatting
yapf==0.32.0
yapf==0.32.0
toml==0.10.2
ruff==0.1.5
ruff==0.1.5
# type checking
# type checking
...
...
vllm/engine/async_llm_engine.py
View file @
6774bd50
...
@@ -2,7 +2,7 @@ import asyncio
...
@@ -2,7 +2,7 @@ import asyncio
import
time
import
time
from
functools
import
partial
from
functools
import
partial
from
typing
import
(
Any
,
Dict
,
Iterable
,
List
,
Optional
,
Set
,
Tuple
,
Type
,
from
typing
import
(
Any
,
Dict
,
Iterable
,
List
,
Optional
,
Set
,
Tuple
,
Type
,
Union
)
Union
,
AsyncIterator
)
from
vllm.config
import
ModelConfig
from
vllm.config
import
ModelConfig
from
vllm.engine.arg_utils
import
AsyncEngineArgs
from
vllm.engine.arg_utils
import
AsyncEngineArgs
...
@@ -401,11 +401,12 @@ class AsyncLLMEngine:
...
@@ -401,11 +401,12 @@ class AsyncLLMEngine:
return
stream
return
stream
async
def
generate
(
async
def
generate
(
self
,
self
,
prompt
:
Optional
[
str
],
prompt
:
Optional
[
str
],
sampling_params
:
SamplingParams
,
sampling_params
:
SamplingParams
,
request_id
:
str
,
request_id
:
str
,
prompt_token_ids
:
Optional
[
List
[
int
]]
=
None
)
->
RequestOutput
:
prompt_token_ids
:
Optional
[
List
[
int
]]
=
None
)
->
AsyncIterator
[
RequestOutput
]:
"""Generate outputs for a request.
"""Generate outputs for a request.
Generate outputs for a request. This method is a coroutine. It adds the
Generate outputs for a request. This method is a coroutine. It adds the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment