Skip to content

gap-ratio: gate demand inflation to the bootstrap window#38

Open
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/miles-mvp-e2efrom
TianyeGGBond:tianye/f-gap-ratio-inflate-window
Open

gap-ratio: gate demand inflation to the bootstrap window#38
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/miles-mvp-e2efrom
TianyeGGBond:tianye/f-gap-ratio-inflate-window

Conversation

@TianyeGGBond

Copy link
Copy Markdown
Collaborator

Context

Fixes #36 (S12-INFLATE-WINDOW from the F1-F12 scheduler review).

In plan_generation_gap_ratio, the demand-inflation branch:

if has_pending:
    # Inflate demand in the bootstrap window (request sent, no progress yet)
    remaining += step_target

was meant to fire only during the bootstrap window ("request sent, no
progress yet"). But its condition only checks rollout_open_pipelines
membership, and that entry survives until release / clear_progress. So
while a rollout is actively progressing (step_target > 0), the branch
still fires and demand is double-counted (remaining = actual_remaining + step_target, percent_remaining > 1), skewing gap-ratio toward whichever
pipeline happens to hold an entry when the other doesn't.

Not a hang — allocation-fairness drift.

Change

scheduler/planner.py:

  • Capture in_bootstrap_window = step_target <= 0.0 before the estimate
    branch overwrites step_target.
  • Gate the inflation on has_pending and in_bootstrap_window so it only
    applies when no progress has been reported yet.

The bootstrap path is byte-for-byte unchanged; only the erroneous
firing on an actively-progressing rollout is removed.

Net: +5 / -3 lines.

🤖 Generated with Claude Code

The has_pending inflation double-counted demand for a rollout that was
still open but already reporting progress, since the rollout_open_pipelines
entry survives until release/clear_progress. Gate it on the no-progress
(bootstrap) condition so actively-progressing rollouts are not double-counted
and gap-ratio fairness holds (rlops#36).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant