Repository navigation
feat(sweep): native grid/matrix expansion for param files (#390) - #394
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…#390) A sweep --param-file can now declare a `grid:` of named value lists, which spawn expands into the cartesian product — one parameter set per combination — instead of requiring the user to pre-generate the full `params` list with a script. grid and an explicit params list may be combined (explicit sets first). Keys expand in sorted order and each key's values in file order, so the generated combinations — and the sweep index assigned to each — are deterministic across runs. Expansion happens in pkg/params.finalize(), shared by the JSON and YAML parsers, so both local and detached sweep launch paths pick it up. --estimate-only reflects the expanded count. Closes #390
scttfrdmn
force-pushed
the
feat/390-sweep-grid
branch
from
July 19, 2026 16:19
4cc9c9e to
4b18831
Compare
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.
Implements #390 (docs-review follow-up).
What
A sweep
--param-filecan now declare agrid:block that spawn expands into the cartesian product — one parameter set per combination:→ 9 instances, no more pre-generating the
paramslist with a Python script (which the docs previously had to recommend).gridand an explicitparamslist can be combined (explicit sets first).--estimate-onlyreflects the expanded instance count.Where
Expansion lives in
pkg/params(finalize()/expandGrid()), shared by the JSON and YAML parsers — so both the local and detached (Lambda) sweep launch paths pick it up for free, since both consumeparams.ParseParamFile. No change tobuildLaunchConfigFromParams.Tests
pkg/params/parser_test.go: 3×3 → 9 expansion, deterministic ordering (repeated runs identical), grid+params combined, and the empty-both error. Manually verifiedspawn launch … --param-file grid.yaml --estimate-onlyreports the 9-instance cost without launching.Notes
docs-genchange (grid is a param-file field, not a CLI flag).go test ./pkg/params/clean.Closes #390