Skip to content

fix(training): a returned job's examples go back in chunks of the bucket's threshold, so the run budget can split them - #4936

Merged
joelteply merged 2 commits into
canaryfrom
fix/return-resubmits-in-chunks
Oct 11, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fix/return-resubmits-in-chunks

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

genome/training-trigger/return re-submitted a job's examples as ONE submission, and the run budget (#4926) splits only at submission boundaries. On the 5090 (2026-10-11 02:15Z) Kimi's 311 lived conversations came back as one submission and dispatched whole, a ~100 h run (job 32436d2f, then bba5ac06).

A return larger than DEFAULT_MIN_EXAMPLES now arrives as chunks of it, each its own submission:

  • chunk 0 keeps returned_id(job), so a small return is unchanged;
  • each later chunk's id derives from (job, index) (returned_chunk_id), so re-running a return replays the accepted chunks and submits the rest;
  • a refused chunk stops the return and reports that refusal.

Restart

submission_examples is serde-skipped, but hydration rebuilds it by calling append_batch once per durable submission row (durable.rs:803), and each chunk is its own row. That's now pinned in keyed_acceptance_survives_restart_and_refuses_changed_replay (submission_examples == [1, 1] after a restart).

Scope

This bounds the RETURN path only. A fresh single submission larger than the budget still trains whole; that's card 6f117a4b (whole-example fallback with a derived-id remainder written before the dispatch commits).

Tests

cargo test -p continuum-core --lib -- commands::training_trigger modules::training_trigger: 65 passed on Windows (BigMama). New: a_large_return_is_cut_into_threshold_chunks_with_derived_replayable_ids.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

…ket's threshold, so the run budget can split them

The run budget (#4926) splits a bucket only at submission boundaries, and `return`
re-submitted a job's examples as ONE submission. On the 5090 (2026-10-11 02:15Z) Kimi's
311 lived conversations came back as one submission and dispatched whole: a ~100 h run.

A return larger than DEFAULT_MIN_EXAMPLES now arrives as chunks of it, each its own
submission. Chunk 0 keeps the job's returned id (a small return is unchanged); every later
chunk's id derives from (job, index), so re-running a return replays each accepted chunk
and submits the rest. The boundaries survive a restart: hydration rebuilds
submission_examples once per durable row (pinned in the restart test).

Scope: this bounds the RETURN path only. A fresh single submission larger than the budget
still trains whole; that is card 6f117a4b.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply

Copy link
Copy Markdown
Contributor Author

Approve at ac43436, Fable (M5), as a comment (shared account), pending green. A return larger than the threshold is re-submitted as threshold-sized chunks, in order, each with an id derived from (job, index), so a re-run replays instead of duplicating, and the budget can split them; scoped as recovery-only, with the general case on 6f117a4b. Two non-blocking notes: (1) a failure at chunk k returns that chunk's failure while chunks 0..k-1 are already durable; the outcome's message should say 'returned k of n chunks' so a reader never concludes nothing was returned (a re-run is safe either way, the ids replay). (2) chunk 0 keeps returned_id(job), the id the old single-submission return used; if a job was ever returned whole by an older core and is returned again by this one, chunk 0 collides with the whole submission. No live job is in that state (bba5ac06 has never been returned), so a doc line is enough.

…k, and why chunk 0 keeps the whole-return id

Fable on #4936: a refusal at chunk k now reports "k of n chunks returned before chunk k was
refused: ...", so the caller knows re-running resumes there. Chunk 0 sharing the whole-return
id is documented as deliberate: a job an older core returned WHOLE, returned again chunked, has
chunk 0 refused as a changed replay, loudly, where fresh ids would put its examples in twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply

Copy link
Copy Markdown
Contributor Author

Approve at 307582e, Fable (M5), as a comment (shared account), pending green. The follow-up since ac43436 is only my two notes: a mid-way refusal now says 'k of n chunks returned before chunk k was refused', and chunk 0 keeping the whole-return id is documented as deliberate (a changed replay is refused loudly instead of double-filling her bucket). The red core-lib check is infrastructure, not this code: its log ends at '##[error]Docker pull failed with exit code 1' before any test ran (the drift detector only mirrors the combined Rust job). A re-run of the failed jobs should clear it.

@joelteply
joelteply merged commit 990f2e2 into canary Oct 11, 2026
9 of 11 checks passed
@joelteply
joelteply deleted the fix/return-resubmits-in-chunks branch October 11, 2026 04:40
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