Repository navigation
docs(examples): check sweeps with spawn sweep status; gate every status/sweep invocation in examples (#1543) - #1546
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Fixes #1543
What was wrong
spawn status <sweep-id>. That command looks its argument up as an instance, so--check-completepolled for an instance that doesn't exist and--jsonprinted nothing about the sweep. The JSON keys they read (Status,TotalParams,Launched,Failed) also aren't in the output, which usesstatus,total_params,launched,failed.wait_sweep_op"waited" by runningspawn launch --param-file sweep.yaml --detach --wait, which starts a second sweep.spawn sweep --file …. That command doesn't exist, becausespawn sweepis only a group:workflow-ml-training.yaml,workflow-ci-pipeline.yaml,multi-region-opportunistic.yamlandresult-collection-example.sh.examples/staging/ml-training.yamlwas not a param file.Fix
spawn sweep status <id> --check-completeandspawn sweep status <id> --output json, and read the real JSON keys.wait_sweep_oppolls the existing sweep. The usage lines usespawn launch --param-file. The script waits withspawn sweep statusand collects withspawn sweep collect.ml-training.yamlis now a real param file: one ensemble member per region, each reading that region's copy of the dataset. The launch gate checks its usage line.spawn statusis correct there.Gate
cmd/example_followup_gate_test.goextracts everyspawn status/spawn sweep …invocation underexamples/. It uses the same extractors and placeholder handling as the #1544 launch gate, which were refactored so they take a pattern. Each invocation must:A sweep-shaped positional argument to
spawn statusfails the gate. That coverssweep-…,$SWEEP_ID,<sweep-id>,$(cat /tmp/sweep_id.txt)and the Pythonsweep_id, which now stays visible as{expr:sweep_id}. A synthetic test checks that each bad form is caught, and another checks that the fixed forms pass.Revert evidence: with
examples/checked out from origin/main, the gate fails 25 invocations. Those are everyspawn statuscall in the 10 workflow files, the 4spawn sweep --fileusage lines, and the script's deprecatedspawn status --sweep-id … --json.The relaunch-to-wait in Dagster is not something the gate can detect. It is fixed by hand.