AllenNeuralDynamics / AllenNeuralDynamics/aind-dynamic-foraging-bfm-dispatcher
launch_beaker_resumable: no way to pin a runtime ref without losing the launch record
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 2 h 9 min
- PR fusionados (30 d)
- 31
Descripción
## Context
To run a rung against an unmerged fix, the runtime refs have to be pinned to branch SHAs.
`experiment_beaker.yaml` carries them as `envVars`, and `pin_runtime_refs` resolves whatever
is there to a full SHA — but it resolves the *template's* value, so a branch SHA has to be
in the template before the launcher runs. Editing the committed template for a one-off
launch is worse than the problem.
The workaround used for the D30 rung and the three replicates (#107):
python code/launch_beaker_resumable.py ... --no-submit # render only
# patch DISPATCHER_REF / FORAGING_MODELS_REF in the rendered spec
# submit experiment_resumable_submitted.yaml via beaker_client.submit_beaker_experiment
It works, and the submitted spec records the exact SHAs. But it **breaks the launcher's own
launch record**: `save_record` runs on the `--no-submit` path with `experiment_id: null`, so
the committed record does not link to the experiment it produced. Four of the five records
added in PR #113 had to have their ids backfilled from the Beaker API by hand.
## Proposal
A repeatable `--pin-ref` option:
python code/launch_beaker_resumable.py ... \
--pin-ref DISPATCHER_REF=26b579d --pin-ref FORAGING_MODELS_REF=fdacb21
applied after the template is read and before `pin_runtime_refs` resolves, so:
- the normal submit path is used, and the record keeps its `experiment_id`
- the pins land in `beaker_resumable.json` as an explicit field, rather than being visible
only by diffing the submitted YAML against the template
- a bare branch name works too, resolved to a SHA the same way `main` already is
## Smaller alternative
If the flag is not wanted, `save_record` could at least refuse to write
`experiment_id: null` silently — a record that cannot be joined to its run is the failure
mode #109 is also about, from a different direction.
## Done when
- [ ] a rung can be launched against unmerged fix branches without `--no-submit`
- [ ] the resulting `beaker_resumable.json` carries both the experiment id and the pins
- [ ] `code/beaker/README.md` documents the flag next to the ref-pinning section
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.