Output copies, model validators, and failed pushes on current main

Aperta
#123 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@SimonHeybrock ci sta già lavorando.

Dal 28/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Three problems that PRs #76, #77, and #79 fixed are still on main. Those PRs branched before the params rework (#109, #117) and the file rename (#119), and now conflict in 5 to 27 files, so each fix is to be made again on the current code. Their descriptions hold the designs that were reviewed.

client.output returns the object the backend holds (#76)

For a record the client keeps, Backend.outputs returns the value from memory without a copy. An accumulator's outputs are deep-copied, and a persisted record's are read from the store. So in a notebook

iofq = client.output(record, 'iofq')
iofq *= scale   # changes what pending requests read and what persist writes

changes the record's outputs, but only in-process. That breaks the promise that where a request runs changes neither its record nor its outputs. #76 made every read return a value the caller owns, copying only where the source does not already give a fresh object.

Model validators of the params model never run in the backend (#77)

WorkflowSpec allows model validators on the params model, and refuses every other decorator there. The backend builds the params with model_construct, so a plain request never runs them. The author's tests construct the model normally and do run them, which gives false confidence. #77 ran them wherever every value they read is known: on the whole params of a plain request, at each call through a stage, and when an accumulator opens. Its rows for groups given field by field no longer apply, since only the first level is interpreted (#109).

One failed push ends an accumulator for good (#79)

Any failure of a push stops the accumulator (Backend._stop): one unreadable run file ends a sum that has grown all beamtime. No call says whether an accumulator is healthy, and the rows pushed so far cannot be read back. #79 made a push fatal only if the driver may be corrupted: a push that fails in the backend, or in driver.push with ess.spec.PushRefused, leaves the accumulator taking pushes. A failed push keeps its number, and state k equals state k-1. Driver.push takes all tables of a push in one call.

Lingua principale
Python
Stelle
0
Fork
1
Merge medio
15h 40m
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scipp/essapps

Tutte le issue di scipp/essapps

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.