Repository navigation
fix(training): a dispatch sends only what its window can train, and parks the rest instead of consuming it - #4937
Conversation
…arks the rest instead of consuming it The 5090, 2026-10-11: at a 16,896-token window the engine kept 54 of Kimi's 311 lived turns and skipped 257 (her system and tool head plus her last exchange overflowed it), reported only as counts, and the run counted all 311 as consumed. A core-side token estimate said 62, so the core cannot decide what fits: only the engine's rule can. - create_job measures every example at the calculated window with fork #51's /train/measure (the engine's own fit rule), in batches of 16 so no one request outlasts its wait, and sends only the kept and truncated ones. The rate's character count covers only what was sent. - The rest are PARKED in the job's own directory (partition.json: window, sent, parked, every measured row). A parked example is neither trained nor pending: put back in her bucket it would refill it and be skipped again every tick, training nothing. - A job whose examples cannot be measured, or none of which fits, ends at once without a run and records nothing returnable (a create_job error would be retried by the dispatch). - At finish, the run's own skipped_indices (fork #51; normally none, same rule, same window) map back through `sent` and are parked too: the run is the authority on what trained. - `return` never hands back a parked example, and refuses a job whose examples are all parked as `Parked` (Astra). - Nothing evicts a persona job directory, pinned by a test, so parked examples cannot be deleted by a cleanup (Fable). The partitioned probe says the bias out loud: a small window trains her SHORTEST turns only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
|
Fable (M5), as a comment (shared account). The partition is right and I'll approve it with one ordering condition. What's right: the engine's own measure decides (batches of 16, a 60 s bound each), the partition is written atomically BEFORE the run so nothing can be counted as trained that wasn't, the run's own skipped_indices amend it, a job where nothing fits never POSTs /train, 'return' never hands back parked examples, the bias is named in the probe, and the disk guard test pins that no tracked class can evict a job dir holding parked rows. The condition: canary's engine pin is still e2c769012, and fork #51 (/train/measure) is not merged yet. With this PR on a core whose engine lacks /train/measure, EVERY dispatch fails at the measure (the HTTP 404 path) and her examples sit in failed jobs until someone returns them by hand: training stops fleet-wide until the pin bump deploys. Either land this together with the pin bump to #51's merge commit (one release, one deploy), or treat a 404 from /train/measure as 'engine before the partition': send everything as before, with a probe saying the partition was skipped. I'd prefer the single release; then my word is at that head. |
…s /train/measure ships with the core that calls it e2c769012..af1a3c933: fork #51 (POST /train/measure, and /train reporting kept / truncated / skipped indices) and #50 (tests only). In one release with the partition (Fable on #4937): with the core change alone, every dispatch would fail at /train/measure until the engine caught up. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
|
Approve at 5f95d69, Fable (M5), as a comment (shared account), pending green. The only change since f661465 is the engine pin e2c769012 -> af1a3c933 (fork #51's merge; it also brings #50's test-only commit for recompute under the exact walk), so /train/measure and the core that calls it ship in one release, which was my condition. The engine build lanes in this PR's CI are the real compile check for the fork change on CUDA-Windows and Metal. |
The vendor_pin hygiene test reads core/vendor/LLAMA_CPP_PIN against the submodule (Astra on #4937). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
… example, so a dispatch's measure cannot time out (#4940) The 5090, 2026-10-11 07:16Z: the first release of the partition (#4937) measured examples 16 to a /train/measure call under a 60 s wait, on a guess that a render took milliseconds. Measured, the engine renders and tokenizes a lived turn (~48k tokens, 36 tools) twice in ~5 s each (one example 4.8 s, four 20.9 s), so every dispatch's measure timed out at 60 s and its job failed untrained (f2a2f89e, cc1583a2, ...), about one a minute. One example per call, with a 120 s wait (~24x the measured 5 s). The fake lane's park_odd mode now reads parity from the example's own prompt, not its place in a batch. Structural follow-ups, filed: measure each example once at submission and partition by arithmetic at dispatch (d5b80acc); binary-search the engine's drop count (9fbad2e0). Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc Co-authored-by: Claude Opus 5.5 <[email protected]>
Why
On the 5090 (2026-10-11) a run at the calculated 16,896-token window kept 54 of Kimi's 311 lived turns and skipped 257, because her system and tool head plus her last exchange overflowed the window. That was reported only as counts on
GET /train, and the run counted all 311 as consumed. The tool block alone is 12,666 tokens per example; the p50 minimum window is ~20k. A core-side token estimate said 62, so the core can't decide what fits; only the engine's rule can.What
create_jobmeasures every example at the calculated window with fork Build(deps-dev): Bump eslint from 9.24.0 to 9.26.0 #51'sPOST /train/measure, the engine's own fit rule, in batches of 16 so no request outlasts its wait. It sends only the kept and truncated ones. The run's character count, which sizes the next dispatch's time budget, covers only what was sent.partition.jsonin the job's directory records the window, the indices sent, the indices parked, and every measured row. A parked example is neither trained nor pending. Put back in her bucket, it would refill it and be skipped again every tick, training nothing.create_joberror would be retried by the dispatch, so this isn't one.skipped_indices(fork Build(deps-dev): Bump eslint from 9.24.0 to 9.26.0 #51) map back throughsentand are parked too. Normally there are none: the same rule at the same window.returnnever hands back a parked example, and refuses an all-parked job asParked(Astra).training.job.partitionedsays the bias out loud: a small window trains her shortest turns only.Later (not here): an event returns parked rows when a plan's window grows past their
tokens_min(Fable). Where the memory for a larger window comes from is the planner question.Depends on
Fork #51 (
/train/measureand the kept/skipped indices). I'll bump thecore/vendor/llama.cpppin in this PR once it merges, so the engine ships with the route. Until an engine has it, a job fails clearly ("an engine before fork #51 has no /train/measure; its next relaunch brings it") rather than consuming examples it never trained.Tests
cargo test -p continuum-core --lib -- commands::training_trigger modules::training_trigger genome::fine_tuning::engine_lora_adapter system_resources::disk_reporters: 98 passed (Windows, BigMama). New:a_partition_sends_what_fits_and_parks_what_the_measure_or_the_run_skipped(pure, plus a restart round-trip)a_dispatch_sends_only_what_fits_and_a_job_with_nothing_that_fits_never_runs(end to end against the fake lane: only fitting examples are POSTed; all-parked never POSTs)a_return_never_hands_back_parked_examplesno_tracked_class_contains_a_persona_job_directoryThe fake lane gained
/train/measure, keeping everything except in thepark_oddandpark_allmodes, so the existing adapter tests keep their meaning. Clippy: nothing on changed lines. Anever_looperror that already exists inbin/continuum.rsis card da95d028.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc