Stop reading cur_batch in is_fully_idle and abort_request (#29406)
This commit is contained in:
@@ -3580,7 +3580,6 @@ class Scheduler(
|
||||
and self.chunked_req is None
|
||||
and not self.dllm_manager.any_staging_reqs()
|
||||
and (self.last_batch is None or self.last_batch.is_empty())
|
||||
and (self.cur_batch is None or self.cur_batch.is_empty())
|
||||
and (not self.enable_overlap or len(self.result_queue) == 0)
|
||||
and self._pp_microbatches_drained()
|
||||
)
|
||||
@@ -3967,7 +3966,7 @@ class Scheduler(
|
||||
|
||||
# Delete requests in the running batch
|
||||
if self.ps.pp_size == 1:
|
||||
inflight_batches = [self.running_batch, self.cur_batch]
|
||||
inflight_batches = [self.running_batch, self.last_batch]
|
||||
else:
|
||||
inflight_batches = [*self.running_mbs, *self.mbs]
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ import torch
|
||||
from sglang.srt.disaggregation.utils import DisaggregationMode
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.layers.logits_processor import LogitsProcessorOutput
|
||||
from sglang.srt.managers.io_struct import AbortReq
|
||||
from sglang.srt.managers.schedule_batch import (
|
||||
FINISH_ABORT,
|
||||
Req,
|
||||
ScheduleBatch,
|
||||
)
|
||||
@@ -492,7 +492,7 @@ class SchedulerBatchResultProcessor:
|
||||
logger.error(
|
||||
f"Grammar accept_token failed for req {req.rid} with token {next_token_id}: {e}"
|
||||
)
|
||||
self.abort_request(AbortReq(rid=req.rid))
|
||||
req.to_finish = FINISH_ABORT()
|
||||
req.grammar.finished = req.finished()
|
||||
|
||||
def _apply_chunked_prefill_logprobs(
|
||||
@@ -611,7 +611,7 @@ class SchedulerBatchResultProcessor:
|
||||
f"Grammar accept_token failed for req {req.rid} with token "
|
||||
f"{tokens}: {e}"
|
||||
)
|
||||
self.abort_request(AbortReq(rid=req.rid))
|
||||
req.to_finish = FINISH_ABORT()
|
||||
return retained
|
||||
|
||||
def process_batch_result_idle(
|
||||
|
||||
Reference in New Issue
Block a user