Minor style fixes to the scheduler.py (#15218)

This commit is contained in:
Lianmin Zheng
2025-12-16 17:09:44 -08:00
committed by GitHub
parent 46ad4b986d
commit 9d64a7b24f
11 changed files with 207 additions and 204 deletions
@@ -331,7 +331,7 @@ class SchedulerOutputProcessorMixin:
next_token_ids = next_token_ids.tolist()
if batch.return_logprob:
next_token_logprobs = logits_output.next_token_logprobs.tolist()
elif batch.is_v2_eagle:
elif batch.is_eagle_v2:
next_token_ids = self._resolve_spec_overlap_token_ids(result, batch)
self.num_generated_tokens += len(batch.reqs)
@@ -356,7 +356,7 @@ class SchedulerOutputProcessorMixin:
new_accepted_len = 1
if batch.spec_algorithm.is_none():
req.output_ids.append(next_token_id)
elif batch.is_v2_eagle:
elif batch.is_eagle_v2:
# Only v2 eagle's output_ids are updated here.
req.output_ids.extend(next_token_id)
new_accepted_len = len(next_token_id)
@@ -406,7 +406,7 @@ class SchedulerOutputProcessorMixin:
if batch.spec_algorithm.is_none():
# Normal decode: single token
req.grammar.accept_token(next_token_id)
elif batch.is_v2_eagle:
elif batch.is_eagle_v2:
# Speculative decode: next_token_id is a list of accepted tokens
for token_id in next_token_id:
req.grammar.accept_token(token_id)
@@ -424,7 +424,7 @@ class SchedulerOutputProcessorMixin:
self.forward_ct_decode = (self.forward_ct_decode + 1) % (1 << 30)
if (
self.current_scheduler_metrics_enabled()
self.current_scheduler_metrics_enabled
and self.forward_ct_decode % self.server_args.decode_log_interval == 0
):
self.log_decode_stats(can_run_cuda_graph, running_batch=batch)