Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/sglang/srt/disaggregation/decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ def event_loop_normal_disagg_decode(self: Scheduler):
self.process_batch_result(batch, result)
else:
# When the server is idle, do self-check and re-init some states
self.self_check_during_idle()
self.on_idle()

# Update last_batch
self.last_batch = batch
Expand Down Expand Up @@ -1224,7 +1224,7 @@ def event_loop_overlap_disagg_decode(self: Scheduler):
tmp_batch, tmp_result = self.result_queue.popleft()
self.process_batch_result(tmp_batch, tmp_result)
elif batch is None:
self.self_check_during_idle()
self.on_idle()

# Run sample of the current batch
# It depends on the result of the last batch (e.g., grammar), so we run it after the last batch is processed.
Expand Down
4 changes: 2 additions & 2 deletions python/sglang/srt/disaggregation/prefill.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def event_loop_normal_disagg_prefill(self: Scheduler) -> None:
result = self.run_batch(batch)
self.process_batch_result(batch, result)
else:
self.self_check_during_idle()
self.on_idle()

self.process_disagg_prefill_inflight_queue()

Expand Down Expand Up @@ -448,7 +448,7 @@ def event_loop_overlap_disagg_prefill(self: Scheduler) -> None:
self.process_batch_result(tmp_batch, tmp_result)
elif batch is None:
# When the server is idle, do self-check and re-init some states
self.self_check_during_idle()
self.on_idle()

self.process_disagg_prefill_inflight_queue()

Expand Down
4 changes: 2 additions & 2 deletions python/sglang/srt/managers/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ def event_loop_normal(self):
self.process_batch_result(batch, result)
else:
# When the server is idle, do self-check and re-init some states.
self.self_check_during_idle()
self.on_idle()

# Update last_batch
self.last_batch = batch
Expand Down Expand Up @@ -1420,7 +1420,7 @@ def pop_and_process():
pop_and_process()
elif batch is None:
# When the server is idle, do self-check and re-init some states
self.self_check_during_idle()
self.on_idle()

# Run sample of the current batch
# It depends on the result of the last batch (e.g., grammar), so we run it after the last batch is processed.
Expand Down
6 changes: 3 additions & 3 deletions python/sglang/srt/managers/scheduler_pp_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def event_loop_pp(self: Scheduler):

# When the server is idle, self-check and re-init some states
if server_is_idle:
self.self_check_during_idle()
self.on_idle()

@DynamicGradMode()
def event_loop_pp_disagg_prefill(self: Scheduler):
Expand Down Expand Up @@ -318,7 +318,7 @@ def event_loop_pp_disagg_prefill(self: Scheduler):

# When the server is idle, self-check and re-init some states
if server_is_idle and len(self.disagg_prefill_inflight_queue) == 0:
self.self_check_during_idle()
self.on_idle()

@DynamicGradMode()
def event_loop_pp_disagg_decode(self: Scheduler):
Expand Down Expand Up @@ -508,7 +508,7 @@ def event_loop_pp_disagg_decode(self: Scheduler):
queue_size += len(self.decode_offload_manager.ongoing_offload)

if server_is_idle and queue_size == 0:
self.self_check_during_idle()
self.on_idle()

def init_pp_loop_state(self: Scheduler):
self.pp_loop_size: int = self.pp_size + self.server_args.pp_async_batch_depth
Expand Down
Loading
Loading