fix(miles-pipeline): unify gen step_target unit to group count#28
Open
TianyeGGBond wants to merge 1 commit into
Open
fix(miles-pipeline): unify gen step_target unit to group count#28TianyeGGBond wants to merge 1 commit into
TianyeGGBond wants to merge 1 commit into
Conversation
Phase B INIT→GENERATION re-request estimated step_target as rollout_batch_size * n_samples_per_prompt, but the per-rollout demand signal uses rollout_batch_size (group count). Unify on group count via a shared _rollout_step_target helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
MilesPipeline._init_phase_b_inferperforms the INIT→GENERATION prioritytransition for
actor_infer. The scheduler's gap-ratio planner skips aGENERATION cluster whose
step_target_estimateisNone, so the re-requestpasses an estimate.
That estimate was computed as
rollout_batch_size * n_samples_per_prompt(a trajectory count), while the per-rollout demand signal
(
signal_rollout_demand, driven by the driver) usesrollout_batch_size(a group count, one group = one prompt's sample set — the F9 unit).
The two feed the same scheduler
step_target_estimatefield withdifferent units. With
n_samples_per_prompt=1(smoke runs) they happento be equal, so it's masked; with a real config (
n_samples_per_prompt>1)the bootstrap estimate is inflated by the sample factor, biasing the
planner's initial demand high.
Change
_rollout_step_target(miles_args)returning thegroup-count estimate (
max(rollout_batch_size, 1)), with a docstringpinning the unit.
n_samples_per_prompt, so the bootstrap estimate matches the per-rolloutdemand signal.
Single file, no behavior change on the smoke path (
n_samples_per_prompt=1).Scope
rlix-side only. The miles dual driver already uses
rollout_batch_sizeandneeds no change.
🤖 Generated with Claude Code