Skip to content

fix(dual-driver): reject partial MILES_DUAL_* env set#18

Open
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/m11-mvp-testfrom
TianyeGGBond:tianye/m11-dual-partial-env-fail-fast
Open

fix(dual-driver): reject partial MILES_DUAL_* env set#18
TianyeGGBond wants to merge 1 commit into
rlops:zhenyu/m11-mvp-testfrom
TianyeGGBond:tianye/m11-dual-partial-env-fail-fast

Conversation

@TianyeGGBond

Copy link
Copy Markdown

Context

run_miles_dual.py chooses its GPU topology from four env vars —
MILES_DUAL_P1_TRAIN, MILES_DUAL_P1_INFER, MILES_DUAL_P2_TRAIN,
MILES_DUAL_P2_INFER (overlap mode) — and otherwise falls back to the
disjoint split.

_overlap_pools_from_env returned None if any of the four was unset
(if None in (...)). So setting three of four (a typo like P2_INFRE, or
forgetting one) silently ran the disjoint topology instead of the
intended overlap one — a quiet way to run the wrong scheduling experiment.

Change

Make the four vars all-or-nothing:

  • all four set → overlap mode (unchanged)
  • none set → None, disjoint fallback (unchanged)
  • partial set → ValueError naming exactly which vars are missing

First half of a review finding; the second half (warn when overlap mode
yields empty cross-pipeline infer intersection) is intentionally left out —
explicit disjoint mappings are a legitimate use, so a hard fail there would
be too strong.

Single file, no behavior change for the existing all-set / none-set paths.

🤖 Generated with Claude Code

_overlap_pools_from_env returned None whenever any of the four
MILES_DUAL_P*_{TRAIN,INFER} vars was unset, so a typo or one missing var
silently fell back to the disjoint topology and ran a different experiment
than intended. Treat the four as all-or-nothing: all set -> overlap, none
set -> disjoint fallback, partial set -> ValueError naming the missing vars.

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