mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-02 18:31:19 +08:00
Code quality improvements: version update, type annotation enhancement, and enum usage simplification (#27581)
Signed-off-by: Bradley <bradley.b.pitt@gmail.com>
This commit is contained in:
parent
921e78f4bb
commit
69f064062b
@ -41,11 +41,11 @@ You can add any other [engine-args](../configuration/engine_args.md) you need af
|
|||||||
create a custom Dockerfile on top of the base image with an extra layer that installs them:
|
create a custom Dockerfile on top of the base image with an extra layer that installs them:
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM vllm/vllm-openai:v0.9.0
|
FROM vllm/vllm-openai:v0.11.0
|
||||||
|
|
||||||
# e.g. install the `audio` optional dependencies
|
# e.g. install the `audio` optional dependencies
|
||||||
# NOTE: Make sure the version of vLLM matches the base image!
|
# NOTE: Make sure the version of vLLM matches the base image!
|
||||||
RUN uv pip install --system vllm[audio]==0.9.0
|
RUN uv pip install --system vllm[audio]==0.11.0
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
|
|||||||
@ -368,7 +368,7 @@ class MultiModalProfiler(Generic[_I]):
|
|||||||
self,
|
self,
|
||||||
seq_len: int,
|
seq_len: int,
|
||||||
mm_counts: Mapping[str, int] | None = None,
|
mm_counts: Mapping[str, int] | None = None,
|
||||||
):
|
) -> Mapping[str, int]:
|
||||||
"""
|
"""
|
||||||
Returns the maximum length of the multimodal (image placeholders+text)
|
Returns the maximum length of the multimodal (image placeholders+text)
|
||||||
tokens, including any break/text tokens in-between image embeddings.
|
tokens, including any break/text tokens in-between image embeddings.
|
||||||
|
|||||||
@ -113,14 +113,12 @@ class Scheduler(SchedulerInterface):
|
|||||||
# req_id -> Request
|
# req_id -> Request
|
||||||
self.requests: dict[str, Request] = {}
|
self.requests: dict[str, Request] = {}
|
||||||
# Scheduling policy
|
# Scheduling policy
|
||||||
if self.scheduler_config.policy == "priority":
|
try:
|
||||||
self.policy = SchedulingPolicy.PRIORITY
|
self.policy = SchedulingPolicy(self.scheduler_config.policy)
|
||||||
elif self.scheduler_config.policy == "fcfs":
|
except ValueError as e:
|
||||||
self.policy = SchedulingPolicy.FCFS
|
|
||||||
else:
|
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Unknown scheduling policy: {self.scheduler_config.policy}"
|
f"Unknown scheduling policy: {self.scheduler_config.policy}"
|
||||||
)
|
) from e
|
||||||
# Priority queues for requests.
|
# Priority queues for requests.
|
||||||
self.waiting = create_request_queue(self.policy)
|
self.waiting = create_request_queue(self.policy)
|
||||||
self.running: list[Request] = []
|
self.running: list[Request] = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user