[Bugfix][Core] Allow AuxOutput reset after abort without running requests (#59060)
Signed-off-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
@@ -1562,13 +1562,7 @@ def test_scheduler_reset_prefix_cache():
|
||||
assert not scheduler.reset_prefix_cache()
|
||||
scheduler.aux_output_connector.reset.assert_not_called()
|
||||
|
||||
with pytest.raises(RuntimeError, match=r"pause\(mode='keep'\)"):
|
||||
scheduler.reset_prefix_cache(reset_running_requests=True)
|
||||
|
||||
# pause(mode="keep") also waits for scheduled model outputs to drain.
|
||||
scheduler.set_pause_state(PauseState.PAUSED_ALL)
|
||||
with pytest.raises(RuntimeError, match="model output is in flight"):
|
||||
scheduler.reset_prefix_cache(reset_running_requests=True)
|
||||
# Pause completes pending model outputs before the caller resets the scheduler.
|
||||
for request in requests:
|
||||
request.num_in_flight_tokens = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user