Repository navigation
feat(launch): implement inline --params; examples use --param-file; gate every spawn launch in examples (#1540) - #1544
Merged
Merged
Conversation
Contributor
Author
|
Live check at
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Nov 6, 2026
Merged
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 #1540
Based on main after #1542 (#1532) merged.
Examples: param files go to
--param-fileEvery example that gave a file to
--paramsnow uses--param-file, and each corrected command was checked against today's flags.examples/README.md: the staging, hyperparameter-search and MPI commands, plus the batch-queue and collect commands.SnakefileandREADME.md.README.md,parameter_sweep_dag.py,taskflow_dag.py,operators/spawn_operator.py.examples/genomics-wdl/gatk-germline/README.md.What swapping the flag alone would have left broken:
sweeps/hyperparameter-search.yaml,staging/reference-genome.yamland the GATKsamples.yamlwere not param files (top-levelsweep_name:,count:,base_command:). They are now real ones: agrid:for the 48-trial search, and one row per sample with the script indefaults: command:.--mpito a sweep, which refuses it. It is now a job array:spawn launch my-mpi-run --count 16 --mpi --efa ….mpi-simulation.yamlnow says it is a description of the job, not a param file.wait_sweeplaunched a second sweep in order to wait.launch_sweepnow uses--detach --wait --output-id, andwait_sweepreadsspawn sweep status --output json.--storageand--tags, which don't exist, and--iam-policy s3:FullAccess, which needs--iam-allow-full-access. Collect used--output top5.csv, which is the global output-format flag.Inline
--params--paramstakes a JSON document in the JSON param-file schema (defaults/params/grid). It is parsed by the same code as a.jsonparam file:parseJSONis split intodecodeJSON, which is shared, and the newpkg/params.ParseParamJSON.--params takes inline JSON; to use the file <path>, pass --param-file <path>. "Looks like a path" means it names an existing file, or ends in.yaml/.yml/.json/.csvwhether or not the file exists. Onlyos.Statis called, and the file is never read.--paramswith--param-fileis refused.--paramsand.jsonparam files alike.runLaunchbefore any AWS call.--no-detachcheckpoint stores the document (inline_params), sospawn resumecan rebuild an inline sweep.--params (inline JSON)instead.docs-genis regenerated.Example gate (extends #1542's)
cmd/example_launch_gate_test.gofinds everyspawn launchunderexamples/(40 today):\continuations.['spawn','launch',…]lists and string commands, including implicit string concatenation.baseCommand: [spawn, launch]tool's bindings.Each invocation must parse with launch's flags and pass the spore-name rule,
sweepUnsupportedFlagsand the param-source checks. A concrete param file that exists must parse and pass the key checks.Placeholders.
{SWEEP_FILE},~{params_file},{{…}},<sweep-id>,$VAR,…and a Python expression are recognised by their characters.--paramsa placeholder is an error, because there it can only stand for a file.…are excused only from the name rule.The gate parses into a copy of the flag definitions. pflag's
Seton a slice flag sets an internal "changed" bit that can't be cleared, which leaked--tag "[]"into later tests.Revert evidence
--params.withJSONPositionreverted: the position tests incmdandpkg/paramsfail.Checks
make checkgo test ./...with AWS env strippedmake test-e2e-tier0semgrep scan --config=auto --error .: 0 findingsmake api-snapshotandmake cli-iam-actions: no change (pkg/paramsis outside the snapshot surface)Follow-ups filed: #1543, and spore-host/spore-host#637 for the umbrella guide, which says inline
--paramsis not implemented. That one is an issue rather than a PR, because the change documents an unreleased flag. The workflow examples check a sweep withspawn status <sweep-id>, which looks the ID up as an instance, and dagster relaunches the sweep to wait.