Skip to content

fix(runtime): Scheduler::schedule() starves a sequence group larger than max_tokens_per_batch #217

Description

@minion1227

Scheduler::schedule() breaks out of the packing loop on the first group that exceeds the remaining token budget. When the highest-priority group's num_seqs is greater than max_tokens_per_batch, it breaks on the very first iteration and returns an empty ScheduleBatch - so that group never makes forward progress (starvation/deadlock), even though it is the only runnable work.

Expected: schedule() should never return an empty batch while a runnable group exists; the highest-priority group should be admitted even if it alone overflows the soft token budget.

No test currently covers the scheduler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions