fix(cli): reject --trials > 1 without --matrix - #1064
Conversation
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
Clean, minimal fix in exactly the right place. I verified the guard sits at the single validation chokepoint — build_eval_plan's only caller is cli/main.py:694 — so it covers every entry path (CLI, --config, --dataset, --source-repo, --source-env; the YAML path has no trials key and sharded workers receive an EvaluationConfig, not flags). The new test is red on main (exit 0, silently one trial) and green here; test_eval_artifact_cli and test_eval_sharding pass, and the --matrix --trials 2 path is unaffected. I also think rejecting is the right call over making plain --trials work: the trials loop is keyed by the matrix alias for the jobs-dir layout (root//trial-NN) and per-trial artifact paths, and plain runs span five source types including hosted source-env — honoring trials everywhere is a feature with layout decisions attached, not a bugfix. Three suggestions, none blocking:
Ordering vs #1046 (feat/ablate-cli): I trial-merged the two branches — clean auto-merge, no textual conflict (your guard is at eval_plan.py:267; our reasoning-effort preflight lands ~170 lines below in the same function), and the merged tree passes all 48 arg-validation tests. Semantically independent too: our ablation paths construct EvalCreateRequest with the default trials=1, so the guard never fires on them. Whichever lands second rebases mechanically — happy to rebase whichever lands second. |
|
Thanks for checking the chokepoint coverage. |
bingran-you
left a comment
There was a problem hiding this comment.
Validated at exact head b186cfb. The guard remains at the canonical planner boundary, now documents the matrix re-entry invariant and gives users the supported single-entry-matrix escape hatch. Focused tests, the complete 5,932-test suite, Ruff format/lint, and ty all pass. Real-key Docker E2E with gemini-3.1-pro-preview completed both matrix trials at reward 1.0; the artifact validator reports 2/2 healthy rollouts with complete ACP/provider trajectories and training-ready rows. Ready to squash merge.
Description
Reject
--trials > 1without--matrixinbuild_eval_planwith a clean, actionableEvalPlanErrorthat explains the supported single-entry-matrix path.Motivation and Context
Only the matrix expansion consumes trials; a plain run silently does one trial per task while the caller believes it ran N. The guard matches the neighboring flag-dependency validations (
--registry requires --dataset,--matrix currently requires --tasks-dir). Matrix-generated per-trial requests bypass this planner by construction.Closes #1060.
Types of changes
Implemented Tasks
--trials > 1 requires --matrixguard tobuild_eval_planValidation
tests/: 5932 passed, 48 skipped, 7 deselectedruff format --check,ruff check, andty check src/gemini-3.1-pro-previewDocker matrix with one alias and two trials: both scored reward 1.0