Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
3257d449
Unverified
Commit
3257d449
authored
Dec 03, 2024
by
Cyrus Leung
Committed by
GitHub
Dec 03, 2024
Browse files
[Misc] Remove deprecated names (#10817)
Signed-off-by:
DarkLight1337
<
tlleungac@connect.ust.hk
>
parent
ef51831e
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
102 deletions
+31
-102
vllm/engine/async_llm_engine.py
vllm/engine/async_llm_engine.py
+6
-2
vllm/engine/llm_engine.py
vllm/engine/llm_engine.py
+3
-2
vllm/engine/multiprocessing/__init__.py
vllm/engine/multiprocessing/__init__.py
+4
-1
vllm/engine/multiprocessing/client.py
vllm/engine/multiprocessing/client.py
+5
-2
vllm/entrypoints/llm.py
vllm/entrypoints/llm.py
+11
-0
vllm/inputs/__init__.py
vllm/inputs/__init__.py
+0
-31
vllm/inputs/data.py
vllm/inputs/data.py
+0
-31
vllm/model_executor/models/aria.py
vllm/model_executor/models/aria.py
+2
-3
vllm/multimodal/__init__.py
vllm/multimodal/__init__.py
+0
-15
vllm/multimodal/base.py
vllm/multimodal/base.py
+0
-15
No files found.
vllm/engine/async_llm_engine.py
View file @
3257d449
...
@@ -6,6 +6,8 @@ from typing import (Any, AsyncGenerator, Callable, Coroutine, Dict, Iterable,
...
@@ -6,6 +6,8 @@ from typing import (Any, AsyncGenerator, Callable, Coroutine, Dict, Iterable,
List
,
Mapping
,
Optional
,
Set
,
Tuple
,
Type
,
Union
,
overload
)
List
,
Mapping
,
Optional
,
Set
,
Tuple
,
Type
,
Union
,
overload
)
from
weakref
import
ReferenceType
from
weakref
import
ReferenceType
from
typing_extensions
import
deprecated
import
vllm.envs
as
envs
import
vllm.envs
as
envs
from
vllm.config
import
(
DecodingConfig
,
LoRAConfig
,
ModelConfig
,
from
vllm.config
import
(
DecodingConfig
,
LoRAConfig
,
ModelConfig
,
ParallelConfig
,
SchedulerConfig
,
VllmConfig
)
ParallelConfig
,
SchedulerConfig
,
VllmConfig
)
...
@@ -422,7 +424,8 @@ class _AsyncLLMEngine(LLMEngine):
...
@@ -422,7 +424,8 @@ class _AsyncLLMEngine(LLMEngine):
return
await
(
return
await
(
self
.
get_tokenizer_group
().
get_lora_tokenizer_async
(
lora_request
))
self
.
get_tokenizer_group
().
get_lora_tokenizer_async
(
lora_request
))
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
async
def
add_request_async
(
async
def
add_request_async
(
self
,
self
,
request_id
:
str
,
request_id
:
str
,
...
@@ -894,7 +897,8 @@ class AsyncLLMEngine(EngineClient):
...
@@ -894,7 +897,8 @@ class AsyncLLMEngine(EngineClient):
# This method does not need to be async, but kept that way
# This method does not need to be async, but kept that way
# for backwards compatibility.
# for backwards compatibility.
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
def
add_request
(
def
add_request
(
self
,
self
,
request_id
:
str
,
request_id
:
str
,
...
...
vllm/engine/llm_engine.py
View file @
3257d449
...
@@ -10,7 +10,7 @@ from typing import Sequence as GenericSequence
...
@@ -10,7 +10,7 @@ from typing import Sequence as GenericSequence
from
typing
import
Set
,
Type
,
Union
,
cast
,
overload
from
typing
import
Set
,
Type
,
Union
,
cast
,
overload
import
torch
import
torch
from
typing_extensions
import
TypeVar
from
typing_extensions
import
TypeVar
,
deprecated
import
vllm.envs
as
envs
import
vllm.envs
as
envs
from
vllm.config
import
(
DecodingConfig
,
LoRAConfig
,
ModelConfig
,
from
vllm.config
import
(
DecodingConfig
,
LoRAConfig
,
ModelConfig
,
...
@@ -719,7 +719,8 @@ class LLMEngine:
...
@@ -719,7 +719,8 @@ class LLMEngine:
def
stop_remote_worker_execution_loop
(
self
)
->
None
:
def
stop_remote_worker_execution_loop
(
self
)
->
None
:
self
.
model_executor
.
stop_remote_worker_execution_loop
()
self
.
model_executor
.
stop_remote_worker_execution_loop
()
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
def
add_request
(
def
add_request
(
self
,
self
,
request_id
:
str
,
request_id
:
str
,
...
...
vllm/engine/multiprocessing/__init__.py
View file @
3257d449
...
@@ -2,6 +2,8 @@ from dataclasses import dataclass
...
@@ -2,6 +2,8 @@ from dataclasses import dataclass
from
enum
import
Enum
from
enum
import
Enum
from
typing
import
List
,
Mapping
,
Optional
,
Union
,
overload
from
typing
import
List
,
Mapping
,
Optional
,
Union
,
overload
from
typing_extensions
import
deprecated
from
vllm
import
PoolingParams
from
vllm
import
PoolingParams
from
vllm.inputs
import
PromptType
from
vllm.inputs
import
PromptType
from
vllm.lora.request
import
LoRARequest
from
vllm.lora.request
import
LoRARequest
...
@@ -32,7 +34,8 @@ class RPCProcessRequest:
...
@@ -32,7 +34,8 @@ class RPCProcessRequest:
prompt_adapter_request
:
Optional
[
PromptAdapterRequest
]
=
None
prompt_adapter_request
:
Optional
[
PromptAdapterRequest
]
=
None
priority
:
int
=
0
priority
:
int
=
0
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
def
__init__
(
def
__init__
(
self
,
self
,
*
,
*
,
...
...
vllm/engine/multiprocessing/client.py
View file @
3257d449
...
@@ -9,6 +9,7 @@ import cloudpickle
...
@@ -9,6 +9,7 @@ import cloudpickle
import
psutil
import
psutil
import
zmq
import
zmq
import
zmq.asyncio
import
zmq.asyncio
from
typing_extensions
import
deprecated
from
zmq
import
Frame
# type: ignore[attr-defined]
from
zmq
import
Frame
# type: ignore[attr-defined]
from
zmq.asyncio
import
Socket
from
zmq.asyncio
import
Socket
...
@@ -414,7 +415,8 @@ class MQLLMEngineClient(EngineClient):
...
@@ -414,7 +415,8 @@ class MQLLMEngineClient(EngineClient):
def
dead_error
(
self
)
->
BaseException
:
def
dead_error
(
self
)
->
BaseException
:
return
ENGINE_DEAD_ERROR
(
self
.
_errored_with
)
return
ENGINE_DEAD_ERROR
(
self
.
_errored_with
)
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
def
generate
(
def
generate
(
self
,
self
,
*
,
*
,
...
@@ -485,7 +487,8 @@ class MQLLMEngineClient(EngineClient):
...
@@ -485,7 +487,8 @@ class MQLLMEngineClient(EngineClient):
lora_request
,
trace_headers
,
lora_request
,
trace_headers
,
prompt_adapter_request
,
priority
)
prompt_adapter_request
,
priority
)
@
overload
# DEPRECATED
@
overload
@
deprecated
(
"'inputs' will be renamed to 'prompt"
)
def
encode
(
def
encode
(
self
,
self
,
*
,
*
,
...
...
vllm/entrypoints/llm.py
View file @
3257d449
...
@@ -6,6 +6,7 @@ from typing import (Any, ClassVar, Dict, List, Optional, Sequence, Tuple, Type,
...
@@ -6,6 +6,7 @@ from typing import (Any, ClassVar, Dict, List, Optional, Sequence, Tuple, Type,
Union
,
cast
,
overload
)
Union
,
cast
,
overload
)
from
tqdm
import
tqdm
from
tqdm
import
tqdm
from
typing_extensions
import
deprecated
from
vllm
import
envs
from
vllm
import
envs
from
vllm.beam_search
import
(
BeamSearchInstance
,
BeamSearchOutput
,
from
vllm.beam_search
import
(
BeamSearchInstance
,
BeamSearchOutput
,
...
@@ -256,6 +257,7 @@ class LLM:
...
@@ -256,6 +257,7 @@ class LLM:
tokenizer_group
.
tokenizer
=
get_cached_tokenizer
(
tokenizer
)
tokenizer_group
.
tokenizer
=
get_cached_tokenizer
(
tokenizer
)
@
overload
# LEGACY: single (prompt + optional token ids)
@
overload
# LEGACY: single (prompt + optional token ids)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
generate
(
def
generate
(
self
,
self
,
prompts
:
str
,
prompts
:
str
,
...
@@ -268,6 +270,7 @@ class LLM:
...
@@ -268,6 +270,7 @@ class LLM:
...
...
@
overload
# LEGACY: multi (prompt + optional token ids)
@
overload
# LEGACY: multi (prompt + optional token ids)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
generate
(
def
generate
(
self
,
self
,
prompts
:
List
[
str
],
prompts
:
List
[
str
],
...
@@ -280,6 +283,7 @@ class LLM:
...
@@ -280,6 +283,7 @@ class LLM:
...
...
@
overload
# LEGACY: single (token ids + optional prompt)
@
overload
# LEGACY: single (token ids + optional prompt)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
generate
(
def
generate
(
self
,
self
,
prompts
:
Optional
[
str
]
=
None
,
prompts
:
Optional
[
str
]
=
None
,
...
@@ -293,6 +297,7 @@ class LLM:
...
@@ -293,6 +297,7 @@ class LLM:
...
...
@
overload
# LEGACY: multi (token ids + optional prompt)
@
overload
# LEGACY: multi (token ids + optional prompt)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
generate
(
def
generate
(
self
,
self
,
prompts
:
Optional
[
List
[
str
]]
=
None
,
prompts
:
Optional
[
List
[
str
]]
=
None
,
...
@@ -306,6 +311,7 @@ class LLM:
...
@@ -306,6 +311,7 @@ class LLM:
...
...
@
overload
# LEGACY: single or multi token ids [pos-only]
@
overload
# LEGACY: single or multi token ids [pos-only]
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
generate
(
def
generate
(
self
,
self
,
prompts
:
None
,
prompts
:
None
,
...
@@ -671,6 +677,7 @@ class LLM:
...
@@ -671,6 +677,7 @@ class LLM:
)
)
@
overload
# LEGACY: single (prompt + optional token ids)
@
overload
# LEGACY: single (prompt + optional token ids)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
encode
(
def
encode
(
self
,
self
,
prompts
:
str
,
prompts
:
str
,
...
@@ -683,6 +690,7 @@ class LLM:
...
@@ -683,6 +690,7 @@ class LLM:
...
...
@
overload
# LEGACY: multi (prompt + optional token ids)
@
overload
# LEGACY: multi (prompt + optional token ids)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
encode
(
def
encode
(
self
,
self
,
prompts
:
List
[
str
],
prompts
:
List
[
str
],
...
@@ -695,6 +703,7 @@ class LLM:
...
@@ -695,6 +703,7 @@ class LLM:
...
...
@
overload
# LEGACY: single (token ids + optional prompt)
@
overload
# LEGACY: single (token ids + optional prompt)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
encode
(
def
encode
(
self
,
self
,
prompts
:
Optional
[
str
]
=
None
,
prompts
:
Optional
[
str
]
=
None
,
...
@@ -708,6 +717,7 @@ class LLM:
...
@@ -708,6 +717,7 @@ class LLM:
...
...
@
overload
# LEGACY: multi (token ids + optional prompt)
@
overload
# LEGACY: multi (token ids + optional prompt)
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
encode
(
def
encode
(
self
,
self
,
prompts
:
Optional
[
List
[
str
]]
=
None
,
prompts
:
Optional
[
List
[
str
]]
=
None
,
...
@@ -721,6 +731,7 @@ class LLM:
...
@@ -721,6 +731,7 @@ class LLM:
...
...
@
overload
# LEGACY: single or multi token ids [pos-only]
@
overload
# LEGACY: single or multi token ids [pos-only]
@
deprecated
(
"'prompt_token_ids' will become part of 'prompts"
)
def
encode
(
def
encode
(
self
,
self
,
prompts
:
None
,
prompts
:
None
,
...
...
vllm/inputs/__init__.py
View file @
3257d449
...
@@ -38,34 +38,3 @@ __all__ = [
...
@@ -38,34 +38,3 @@ __all__ = [
"InputProcessingContext"
,
"InputProcessingContext"
,
"InputRegistry"
,
"InputRegistry"
,
]
]
def
__getattr__
(
name
:
str
):
import
warnings
if
name
==
"PromptInput"
:
msg
=
(
"PromptInput has been renamed to PromptType. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
PromptType
if
name
==
"LLMInputs"
:
msg
=
(
"LLMInputs has been renamed to DecoderOnlyInputs. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
DecoderOnlyInputs
if
name
==
"EncoderDecoderLLMInputs"
:
msg
=
(
"EncoderDecoderLLMInputs has been renamed to EncoderDecoderInputs. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
EncoderDecoderInputs
raise
AttributeError
(
f
"module
{
__name__
!
r
}
has no attribute
{
name
!
r
}
"
)
vllm/inputs/data.py
View file @
3257d449
...
@@ -358,34 +358,3 @@ def to_enc_dec_tuple_list(
...
@@ -358,34 +358,3 @@ def to_enc_dec_tuple_list(
return
[(
enc_dec_prompt
[
"encoder_prompt"
],
return
[(
enc_dec_prompt
[
"encoder_prompt"
],
enc_dec_prompt
[
"decoder_prompt"
])
enc_dec_prompt
[
"decoder_prompt"
])
for
enc_dec_prompt
in
enc_dec_prompts
]
for
enc_dec_prompt
in
enc_dec_prompts
]
def
__getattr__
(
name
:
str
):
import
warnings
if
name
==
"PromptInput"
:
msg
=
(
"PromptInput has been renamed to PromptType. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
PromptType
if
name
==
"LLMInputs"
:
msg
=
(
"LLMInputs has been renamed to DecoderOnlyInputs. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
DecoderOnlyInputs
if
name
==
"EncoderDecoderLLMInputs"
:
msg
=
(
"EncoderDecoderLLMInputs has been renamed to EncoderDecoderInputs. "
"The original name will be removed in an upcoming version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
EncoderDecoderInputs
raise
AttributeError
(
f
"module
{
__name__
!
r
}
has no attribute
{
name
!
r
}
"
)
vllm/model_executor/models/aria.py
View file @
3257d449
...
@@ -32,9 +32,8 @@ from vllm.model_executor.models.utils import (AutoWeightsLoader, WeightsMapper,
...
@@ -32,9 +32,8 @@ from vllm.model_executor.models.utils import (AutoWeightsLoader, WeightsMapper,
maybe_prefix
,
maybe_prefix
,
merge_multimodal_embeddings
)
merge_multimodal_embeddings
)
from
vllm.multimodal
import
MULTIMODAL_REGISTRY
from
vllm.multimodal
import
MULTIMODAL_REGISTRY
from
vllm.multimodal.base
import
MultiModalInputs
from
vllm.multimodal.image
import
cached_get_image_processor
from
vllm.multimodal.image
import
cached_get_image_processor
from
vllm.multimodal.inputs
import
NestedTensors
from
vllm.multimodal.inputs
import
MultiModalKwargs
,
NestedTensors
from
vllm.multimodal.utils
import
(
cached_get_tokenizer
,
from
vllm.multimodal.utils
import
(
cached_get_tokenizer
,
repeat_and_pad_placeholder_tokens
)
repeat_and_pad_placeholder_tokens
)
from
vllm.sequence
import
IntermediateTensors
from
vllm.sequence
import
IntermediateTensors
...
@@ -451,7 +450,7 @@ def get_max_multimodal_tokens(ctx):
...
@@ -451,7 +450,7 @@ def get_max_multimodal_tokens(ctx):
def
input_mapper_for_aria
(
ctx
,
data
):
def
input_mapper_for_aria
(
ctx
,
data
):
return
MultiModal
Input
s
(
data
)
return
MultiModal
Kwarg
s
(
data
)
def
input_processor
(
ctx
,
llm_inputs
):
def
input_processor
(
ctx
,
llm_inputs
):
...
...
vllm/multimodal/__init__.py
View file @
3257d449
...
@@ -27,18 +27,3 @@ __all__ = [
...
@@ -27,18 +27,3 @@ __all__ = [
"MULTIMODAL_REGISTRY"
,
"MULTIMODAL_REGISTRY"
,
"MultiModalRegistry"
,
"MultiModalRegistry"
,
]
]
def
__getattr__
(
name
:
str
):
import
warnings
if
name
==
"MultiModalInputs"
:
msg
=
(
"MultiModalInputs has been renamed to MultiModalKwargs. "
"The original name will take another meaning in an upcoming "
"version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
MultiModalKwargs
raise
AttributeError
(
f
"module
{
__name__
!
r
}
has no attribute
{
name
!
r
}
"
)
vllm/multimodal/base.py
View file @
3257d449
...
@@ -433,18 +433,3 @@ class MultiModalPlaceholderMap:
...
@@ -433,18 +433,3 @@ class MultiModalPlaceholderMap:
return
MultiModalPlaceholderMap
.
IndexMap
(
src
=
src_indices
,
return
MultiModalPlaceholderMap
.
IndexMap
(
src
=
src_indices
,
dest
=
dest_indices
)
dest
=
dest_indices
)
def
__getattr__
(
name
:
str
):
import
warnings
if
name
==
"MultiModalInputs"
:
msg
=
(
"MultiModalInputs has been renamed to MultiModalKwargs. "
"The original name will take another meaning in an upcoming "
"version."
)
warnings
.
warn
(
DeprecationWarning
(
msg
),
stacklevel
=
2
)
return
MultiModalKwargs
raise
AttributeError
(
f
"module
{
__name__
!
r
}
has no attribute
{
name
!
r
}
"
)
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