Skip to content
Open
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
8 changes: 5 additions & 3 deletions rlix/scheduler/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def _receiver_eligible(state: _GapRatioPipelineState) -> bool:
# Derive remaining from completed metric; same derivation path as
# background rebalance to keep demand semantics consistent.
remaining, step_target = progress_totals_fn(pipeline_id=pipeline_id)
# Capture before the estimate branch overwrites step_target.
in_bootstrap_window = step_target <= 0.0
if step_target <= 0.0:
if has_pending:
raw_estimate = rollout_open_pipelines.get(pipeline_id)
Expand All @@ -210,9 +212,9 @@ def _receiver_eligible(state: _GapRatioPipelineState) -> bool:
else:
percent_remaining = remaining / step_target if step_target > 0 else 0.0

if has_pending:
# Inflate demand in the bootstrap window (request sent, no progress yet)
# so the pipeline gets at least one DP worker allocated before generation starts.
if has_pending and in_bootstrap_window:
# Inflate demand only in the bootstrap window (request sent, no
# progress yet); once progress flows we must not double-count (#36).
remaining += step_target
percent_remaining = remaining / step_target if step_target > 0 else 0.0

Expand Down