fix(dual-driver): reject partial MILES_DUAL_* env set#18
Open
TianyeGGBond wants to merge 1 commit into
Open
Conversation
_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>
This was referenced Jun 21, 2026
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
run_miles_dual.pychooses 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 thedisjoint split.
_overlap_pools_from_envreturnedNoneif any of the four was unset(
if None in (...)). So setting three of four (a typo likeP2_INFRE, orforgetting 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:
None, disjoint fallback (unchanged)ValueErrornaming exactly which vars are missingFirst 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