Skip to content

fix(miles-pipeline): unify gen step_target unit to group count#28

Open
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/miles-mvp-e2efrom
TianyeGGBond:tianye/fix-gen-step-target-unit
Open

fix(miles-pipeline): unify gen step_target unit to group count#28
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/miles-mvp-e2efrom
TianyeGGBond:tianye/fix-gen-step-target-unit

Conversation

@TianyeGGBond

Copy link
Copy Markdown
Collaborator

Context

MilesPipeline._init_phase_b_infer performs the INIT→GENERATION priority
transition for actor_infer. The scheduler's gap-ratio planner skips a
GENERATION cluster whose step_target_estimate is None, so the re-request
passes 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) uses rollout_batch_size
(a group count, one group = one prompt's sample set — the F9 unit).

The two feed the same scheduler step_target_estimate field with
different units. With n_samples_per_prompt=1 (smoke runs) they happen
to 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

  • Add module-level helper _rollout_step_target(miles_args) returning the
    group-count estimate (max(rollout_batch_size, 1)), with a docstring
    pinning the unit.
  • Phase B step 8 now calls the helper instead of multiplying by
    n_samples_per_prompt, so the bootstrap estimate matches the per-rollout
    demand 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_size and
needs no change.

🤖 Generated with Claude Code

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>
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