Skip to content

fix(training): a job the engine refused hands its examples back, so the bucket re-fires at a smaller chunk (card 2dfce676) - #4904

Merged
joelteply merged 2 commits into
canaryfrom
2dfce676/return-on-refusal
Oct 10, 2026
Merged

joelteply merged 2 commits into
canaryfrom
2dfce676/return-on-refusal

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Fable's 739f1845, the "training works well" path Joel put first. #4894 files a refused
graph's measured size so the NEXT dispatch steps the chunk down, but the next dispatch
only happens once the job's examples are back in her bucket. The completion sentinel
claimed a Failed job and logged "dropped, nothing to measure"; the trigger was never told.
So each rung down the chunk ladder needed a human to run genome/training-trigger/return.

  • engine_lora_adapter: when the engine refuses a run and files its graph (graph_mib > 0),
    the run also records a typed Refusal { window, chunk, graph_bytes, error } as
    refusal.json in the job's own directory (EngineRun now carries job_dir from its spec).
    A typed record, not a match on error text.
  • job_board: claim() hands a FAILED, trigger-dispatched job to the trigger
    (take_failed), the way boot orphans already reach it (take_orphans). The sentinel
    stays a pure poller.
  • training_trigger: the existing 30s tick (no new loop) runs return_refused_jobs before
    recover_tick. A taken job whose directory holds a refusal, with a smaller chunk left,
    goes back through return_job, the one return (refuses an open or trained job;
    replay-safe returned_id; journaled). The same tick's recover_tick re-fires the bucket.
  • Loop guard: refusal_has_smaller_rung. At the smallest chunk a return would be refused
    again forever, so it stays for a human (training.job.refusal_at_floor).

Tests: a_failed_trigger_dispatched_job_is_handed_to_the_trigger_once (job_board);
a_refused_job_records_its_shape_and_the_ladder_ends_at_the_smallest_chunk (adapter).
Not compiled on IntelMac; CI builds and tests.

Co-Authored-By: Claude Opus 5.5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…he bucket re-fires at a smaller chunk (card 2dfce676)

Fable's 739f1845, the "training works well" path Joel put first. #4894 files a refused
graph's measured size so the NEXT dispatch steps the chunk down, but the next dispatch
only happens once the job's examples are back in her bucket. The completion sentinel
claimed a Failed job and logged "dropped, nothing to measure"; the trigger was never told.
So each rung down the chunk ladder needed a human to run genome/training-trigger/return.

- engine_lora_adapter: when the engine refuses a run and files its graph (graph_mib > 0),
  the run also records a typed Refusal { window, chunk, graph_bytes, error } as
  refusal.json in the job's own directory (EngineRun now carries job_dir from its spec).
  A typed record, not a match on error text.
- job_board: claim() hands a FAILED, trigger-dispatched job to the trigger
  (take_failed), the way boot orphans already reach it (take_orphans). The sentinel
  stays a pure poller.
- training_trigger: the existing 30s tick (no new loop) runs return_refused_jobs before
  recover_tick. A taken job whose directory holds a refusal, with a smaller chunk left,
  goes back through return_job, the one return (refuses an open or trained job;
  replay-safe returned_id; journaled). The same tick's recover_tick re-fires the bucket.
- Loop guard: refusal_has_smaller_rung. At the smallest chunk a return would be refused
  again forever, so it stays for a human (training.job.refusal_at_floor).

Tests: a_failed_trigger_dispatched_job_is_handed_to_the_trigger_once (job_board);
a_refused_job_records_its_shape_and_the_ladder_ends_at_the_smallest_chunk (adapter).
Not compiled on IntelMac; CI builds and tests.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply

Copy link
Copy Markdown
Contributor Author

Approve at 7b60d2f, Fable (M5), as a comment (shared account), pending green. Checked the thing that decides whether it works: a dispatch intent finishes when the job is created, and the bucket's hold afterwards is the board's OPEN job for the competence; a job that failed is no longer open, so the returned batch re-fires through the one acceptance path and choose_chunk reads the filed footprint. The ladder is bounded (refuse at 512 -> return -> 256 -> at the floor it stops and says so), a refusal that could not be recorded is named and left for a human, and only trigger-dispatched Failed jobs are handed over, once. Non-blocking: when the floor stops it, the examples stay in the job dir with only the probe; worth a line in the status report so an operator sees 'held at floor' on the bucket, not just in the stream.

@joelteply
joelteply merged commit ffded01 into canary Oct 10, 2026
7 checks passed
@joelteply
joelteply deleted the 2dfce676/return-on-refusal branch October 10, 2026 09:13
joelteply added a commit that referenced this pull request Oct 10, 2026
…s examples back, like an engine refusal (card 0b8de4da) (#4912)

BigMama on the 5090, 2026-10-10: job a7893e09 was bound to the lane chosen before a
re-home; at admission's bind, "the lane was replaced while this job waited", the job
failed, and her 18 examples stranded until a human cancelled and returned it. #4904's
return-on-refusal (card 2dfce676) covered only engine refusals.

- engine_lora_adapter: one typed record, returnable.json =
  Returnable::{EngineRefused(Refusal) | LaneReplaced { error }}, written where each
  happens: the TrainState::Error arm (as #4904), and now the admission bind closure
  when the live lane isn't the chosen one. #4904's refusal.json (already on the 5090)
  is still read, as EngineRefused, so nothing on disk is misread.
- training_trigger: return_refused_jobs reads the Returnable. EngineRefused keeps the
  smaller-rung guard; LaneReplaced returns, and the next dispatch plans against the new
  lane.

Assumption for review: a bind failure ends the job Failed on the board, so the
completion sentinel claims it and #4904's take_failed hands it to the trigger. That
matches a7893e09 ending (it needed a manual return), but it's worth a reviewer's eye.

Test: the refusal test now covers the legacy refusal.json read as EngineRefused, and
returnable.json (LaneReplaced) winning over it. Not compiled on IntelMac; CI builds
and tests.


Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant