mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-19 09:47:11 +08:00
linting
Signed-off-by: Pr0Wh1teGivee <calvin_zhu0210@outlook.com> Signed-off-by: weichen <calvin_zhu0210@outlook.com>
This commit is contained in:
parent
dd0e1224bc
commit
db3e0a576e
@ -99,5 +99,6 @@ class TimeAndLengthScorer(NormalizedScorer):
|
||||
]
|
||||
super().__init__(dim_list)
|
||||
|
||||
def score(self, time: float, length: float) -> float:
|
||||
return super().score(time, length)
|
||||
def score(self, *dims: float) -> float:
|
||||
assert len(dims) == 2
|
||||
return super().score(*dims)
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
import time
|
||||
from functools import total_ordering
|
||||
from typing import Any
|
||||
|
||||
from vllm.v1.core.sched.policy.normalized_scorer import TimeAndLengthScorer
|
||||
from typing import Optional, List, Any
|
||||
|
||||
TimeAndLengthScorer_Instance = None
|
||||
|
||||
@ -24,7 +24,7 @@ class WeightedScoreSorter:
|
||||
self,
|
||||
request_length: int,
|
||||
request_arrival_time: float,
|
||||
request_slo_requirement: Optional[List[Any]] = None,
|
||||
request_slo_requirement: list[Any] | None = None,
|
||||
):
|
||||
self.request_length = request_length
|
||||
self.request_arrival_time = request_arrival_time
|
||||
|
||||
@ -221,7 +221,7 @@ class SJFRequestQueue(RequestQueue):
|
||||
|
||||
def add_request(self, request: Request) -> None:
|
||||
"""Add a request to the queue according to SJF policy."""
|
||||
assert request.prompt_token_ids is not None, "prompt_token_ids cannot be None for SJF scheduling."
|
||||
assert request.prompt_token_ids is not None
|
||||
heapq.heappush(
|
||||
self._heap,
|
||||
(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user