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:
usberkeley
2025-10-27 17:50:22 +00:00
committed by GitHub
parent 921e78f4bb
commit 69f064062b
3 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -368,7 +368,7 @@ class MultiModalProfiler(Generic[_I]):
self,
seq_len: int,
mm_counts: Mapping[str, int] | None = None,
):
) -> Mapping[str, int]:
"""
Returns the maximum length of the multimodal (image placeholders+text)
tokens, including any break/text tokens in-between image embeddings.
+4 -6
View File
@@ -113,14 +113,12 @@ class Scheduler(SchedulerInterface):
# req_id -> Request
self.requests: dict[str, Request] = {}
# Scheduling policy
if self.scheduler_config.policy == "priority":
self.policy = SchedulingPolicy.PRIORITY
elif self.scheduler_config.policy == "fcfs":
self.policy = SchedulingPolicy.FCFS
else:
try:
self.policy = SchedulingPolicy(self.scheduler_config.policy)
except ValueError as e:
raise ValueError(
f"Unknown scheduling policy: {self.scheduler_config.policy}"
)
) from e
# Priority queues for requests.
self.waiting = create_request_queue(self.policy)
self.running: list[Request] = []