[Bugfix] Reject max_num_scheduled_tokens=0 at config time instead of hanging (#60714)

Signed-off-by: Vadim Gimpelson <vadim.gimpelson@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Hui Li <40770106+untrall@users.noreply.github.com>
This commit is contained in:
Vadim Gimpelson
2026-10-09 19:15:10 +00:00
committed by GitHub
co-authored by Claude Hui Li
parent ad8a6065f4
commit 04462732a4
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -3486,6 +3486,12 @@ def test_scheduler_config_init():
print(SchedulerConfig.default_factory().max_model_len)
def test_scheduler_config_rejects_zero_max_num_scheduled_tokens():
"""A zero token budget never schedules anything, so generation would hang."""
with pytest.raises(ValidationError, match="max_num_scheduled_tokens"):
SchedulerConfig.default_factory(max_num_scheduled_tokens=0)
@pytest.mark.parametrize(
(
"model_id",