Repository navigation
feat(genome): one typed return of a job's examples, and a verb for the jobs that never trained - #4800
Conversation
|
Read it; the shape is right (one reader, one conversion, job id as the replay identity, refuses open and trained, journal_returned). One defect before a word: |
…e on #4800) SubmitParams::returning dropped eval_set/lora/schedule/local_artifact_dir, and same_policy compares them exactly, so a return into a bucket that already held a producer's batch (code traits carry the gym's evalSet) was refused InconsistentBucket and the examples stayed stranded. Mapping the job's fields through alone would not fix it either: the trainer's adapter writes its own defaults into the job's request.json, so a returned lora: Some(default) never equals a producer's None. So the one return, return_request, ADOPTS the policy the key already holds (the pending bucket's, else the active dispatch's, through TrainingTriggerState::held_policy) and pins the job's own (now mapped through by returning) only into an empty key. BucketPolicy is THE set of fields a bucket pins; same_policy compares it, so what acceptance requires and what a return adopts cannot drift. The boot Held arm calls return_request directly (resume_orphans_once takes self: &Arc<Self>) instead of round-tripping JSON through the executor. Test: a producer's batch (evalSet, no lora) then a returned job (evalSet + the adapter's default lora) gives 1 + 2 examples in one bucket, not InconsistentBucket. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
a2eadf7 to
e2aab85
Compare
|
APPROVED at 4f3ac34, pending its checks. |
…e on #4800) SubmitParams::returning dropped eval_set/lora/schedule/local_artifact_dir, and same_policy compares them exactly, so a return into a bucket that already held a producer's batch (code traits carry the gym's evalSet) was refused InconsistentBucket and the examples stayed stranded. Mapping the job's fields through alone would not fix it either: the trainer's adapter writes its own defaults into the job's request.json, so a returned lora: Some(default) never equals a producer's None. So the one return, return_request, ADOPTS the policy the key already holds (the pending bucket's, else the active dispatch's, through TrainingTriggerState::held_policy) and pins the job's own (now mapped through by returning) only into an empty key. BucketPolicy is THE set of fields a bucket pins; same_policy compares it, so what acceptance requires and what a return adopts cannot drift. The boot Held arm calls return_request directly (resume_orphans_once takes self: &Arc<Self>) instead of round-tripping JSON through the executor. Test: a producer's batch (evalSet, no lora) then a returned job (evalSet + the adapter's default lora) gives 1 + 2 examples in one bucket, not InconsistentBucket. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
4f3ac34 to
faa29b0
Compare
…alizable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
APPROVED at faa29b0 (restacked on e2aab85; the two unwrap_or on the submit defaults are the pre-existing lines moved into submit_batch). The verb journals through the typed journal_returned; 4802 changes that function's signature to |
e2aab85 to
845ca43
Compare
…alizable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…e on #4800) SubmitParams::returning dropped eval_set/lora/schedule/local_artifact_dir, and same_policy compares them exactly, so a return into a bucket that already held a producer's batch (code traits carry the gym's evalSet) was refused InconsistentBucket and the examples stayed stranded. Mapping the job's fields through alone would not fix it either: the trainer's adapter writes its own defaults into the job's request.json, so a returned lora: Some(default) never equals a producer's None. So the one return, return_request, ADOPTS the policy the key already holds (the pending bucket's, else the active dispatch's, through TrainingTriggerState::held_policy) and pins the job's own (now mapped through by returning) only into an empty key. BucketPolicy is THE set of fields a bucket pins; same_policy compares it, so what acceptance requires and what a return adopts cannot drift. The boot Held arm calls return_request directly (resume_orphans_once takes self: &Arc<Self>) instead of round-tripping JSON through the executor. Test: a producer's batch (evalSet, no lora) then a returned job (evalSet + the adapter's default lora) gives 1 + 2 examples in one bucket, not InconsistentBucket. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
faa29b0 to
55bc80c
Compare
845ca43 to
3d52bfb
Compare
…alizable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…e jobs that never trained
A job takes its examples out of the bucket when it is dispatched. A job that then ends
without training a step leaves them in its directory, and no fill sees them again: on
the 5090 2026-10-05, 18 of Kimi's jobs stranded ~500 examples that way.
ONE typed path back:
- read_job_request(dir) is the one reader of a job's request.json (the planner's spec
restored to the registry id); resumable_request uses it and now reports why a
request can't be read instead of an empty Option.
- SubmitParams::returning(request, job) is the one conversion of a job back into a
submit: only the bucket key and examples ride back (the job's LoRA, schedule and
eval set are the bucket's to pin), and the job's id is the batch identity, so a
second return of the same job is a replay, never a second copy.
- submit_batch is submit's body, shared, so a returned job's examples are accepted,
deduped and dispatched exactly as any batch.
The held-orphan arm at boot used an inline serde_json::Value with unwrap_or(Null) per
required field, and counted a refused submit (success=false) as returned. It now
goes through SubmitParams::returning and decodes SubmitOutcome, requiring success
before it journals the orphan returned.
genome/training-trigger/return {jobId} hands back a job that ended without training:
it refuses an open job (it trains or resumes itself) and a trained one (its checkpoint
or adapter is its outcome), and journals through job_board::journal_returned.
Deliberately a verb, not automatic on failure: a deterministic failure (out of device
memory at its window) would refill, re-dispatch and fail forever.
Job-board lookups registration(job) and is_terminal(job) read the ledger through
orphan_of, now the one reading of a registration row. default_job_dir no longer
falls back to "." without a home directory; job_dir_under is the one job layout.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…e on #4800) SubmitParams::returning dropped eval_set/lora/schedule/local_artifact_dir, and same_policy compares them exactly, so a return into a bucket that already held a producer's batch (code traits carry the gym's evalSet) was refused InconsistentBucket and the examples stayed stranded. Mapping the job's fields through alone would not fix it either: the trainer's adapter writes its own defaults into the job's request.json, so a returned lora: Some(default) never equals a producer's None. So the one return, return_request, ADOPTS the policy the key already holds (the pending bucket's, else the active dispatch's, through TrainingTriggerState::held_policy) and pins the job's own (now mapped through by returning) only into an empty key. BucketPolicy is THE set of fields a bucket pins; same_policy compares it, so what acceptance requires and what a return adopts cannot drift. The boot Held arm calls return_request directly (resume_orphans_once takes self: &Arc<Self>) instead of round-tripping JSON through the executor. Test: a producer's batch (evalSet, no lora) then a returned job (evalSet + the adapter's default lora) gives 1 + 2 examples in one bucket, not InconsistentBucket. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…eturned Restacked onto e2aab85: journal_returned takes held_by as the serialized Took. An operator's return is held by no Took, so it is named by the verb. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
55bc80c to
54f1d3b
Compare
…alizable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…alizable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ard cb14cc13) (#4802) * fix(genome): a completed job holds its competence through adoption (card cb14cc13) The sentinel claimed a job off the board the instant it saw Completed, then converted (minutes for an MLX export), registered, opened the trial and stamped the signature. In between: not on the board, no trial yet, no signature in the store. A full bucket in that window minted a second gene for the same competence (Cormac on #4794, point 6). - TrainingJobBoard keeps completed jobs in an `adopting` set; `pending()` (in flight + adopting) is what the gates read (held_for, job-create's join); `snapshot()` stays the sentinel's poll set. In memory only: a core that dies mid-adoption loses the adoption as before, and the ledger's terminal row already stands. - The chain holds an AdoptionHold guard; dropping it on any path out (adopted or refused) calls adoption_done. The no-executor path releases explicitly. - The signature is stamped BEFORE the trial opens, so from the moment the gene is live a fill finds it by distance. - Test: a fill during adoption joins the job; after adoption_done the competence decides again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(genome): journal_returned serializes the reason itself; an unserializable one is written as that, never as null (BigMama on #4800) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(genome): §6 says what exists after tonight (the surprise gate, Expired, the bound, the lease) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(genome): canary's operator-return caller lends its reason to journal_returned (Cormac on #4802) journal_returned takes the held-by reason by reference since this PR (it serializes it itself); the operator return verb landed on canary after with a by-value json!. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
Stacked on Fable's
genome/train-share-ppm(#4794/#4796/#4798) so the stack inherits the typed return in its Held arm. When that stack merges, retarget this to canary before the base branch is deleted (a stacked PR auto-closes on base deletion).Why: a job takes its examples out of the bucket when it's dispatched. A job that ends without training a step leaves them in its directory, and no fill sees them again. On the 5090 on 2026-10-05, 18 of Kimi's jobs stranded about 500 examples that way.
One typed path back:
read_job_request(dir): the one reader of a job'srequest.json.resumable_requestuses it and now says why a request can't be read.SubmitParams::returning(request, job): the one conversion of a job back into a submit. Only the bucket key and examples ride back; the bucket pins its own policy. The job's id is the batch identity, so returning the same job twice is a replay.submit_batch: submit's body, shared, so a returned batch is accepted, deduped and dispatched exactly like any other.The boot Held arm: it used an inline
serde_json::Valuewithunwrap_or(Null)per required field, and counted a refused submit (success: false) as returned. It now goes throughreturning, decodesSubmitOutcome, and requiressuccessbefore journaling.genome/training-trigger/return {jobId}: hands back a job that ended without training.job_board::journal_returned.Also:
registration(job)/is_terminal(job)read the ledger throughorphan_of(now the one reading of a registration row).default_job_dirno longer falls back to.without a home directory.Tests:
training_trigger+job_board: 54 passed. The new return test runs over an explicit board and genome root and never touches the node's ledger; it checks the job is returned once, a replay doesn't double it, an open job is refused, and a trained job is refused.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc