Repository navigation
The capacity beacon names the bases a peer may lease training to this node for (card 6f05b89d, S1) - #5356
Conversation
… node for (card 6f05b89d, S1) IntelMac's residents have no trainer, so a reviewed correction never becomes a gene there. Grid training starts with the grid knowing who can train. CapacityOffer gains trainable_bases: the served base, when a trainer on THIS host (its resident weights or its own copy) would accept a LoRA job for it. A grid-peer or cloud trainer never counts, so a node never advertises training it would only pass on. An older core advertises nothing (serde default), which reads as "trains nothing". FineTuningCoordinator::trains_base_here answers it with the same gate select uses: caps_match's hardware and prefix half is now runs_base_here, shared by both. The grid-capacity module asks the genome module at offer time through the module registry, so initialization order never matters. No consumer yet; S2 (the grid-peer trainer) selects a peer by it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… never selected, never advertised (card 6f05b89d, S1) Codex's review of the S1 design: advertise only a trainer that can actually run, not an adapter that is merely registered with a missing dependency. The MLX and CUDA trainers kept the default serves_base (true), so the coordinator selected them, and the beacon would have advertised them, for a job they refuse at create_job: no interpreter is TrainerUnavailable, and a base whose registry row names no hf_source is InvalidRequest. Both now answer serves_base with a_python_trainer_serves: the interpreter is a file, and the base resolves to a trainable source. That is the same check create_job makes, run before selection instead of after it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
bcb55bf to
7b92320
Compare
…cies, probed once (card 6f05b89d, S1) Codex's review of #5356 at 7b92320: an interpreter file that exists is not a usable trainer. A venv missing mlx_lm, or the CUDA trainer's packages, would still be selected and advertised as trainable. PythonTrainerReadiness (new file) is the trainer owner's cached answer. When the trainer is built, a background thread runs `python -c "import ..."` once: `import mlx_lm` for MLX, and torch plus cuda-requirements.txt's packages for CUDA. Until it answers yes the trainer is not ready, so no guessed timeout decides it, and a hung import stays unadvertised. Nothing runs per beacon or per selection. A missing interpreter is never ready and spawns nothing. serves_base asks it, plus the base's trainable HF source. adapter.rs's file-existence helper is gone. Test: an interpreter whose imports fail is not ready, a missing one is never ready, and only a succeeding probe is (fake interpreters, unix). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…e adds no spawn site (card 6f05b89d, S1) The spawn-site ratchet failed #5356 at 541e226 (job 120819980667: spawn_sites 126 -> 127). The readiness probe was a new Command::new. ask_python (python_trainer_readiness.rs) is now the one place a trainer spawns its interpreter to ask something: the readiness import probe, and MLX's chat-template probe, which dropped its own tokio spawn and runs through spawn_blocking. Spawn sites are back to canary's count. One behaviour note: a cancelled job now lets that short probe finish its tokenizer load instead of killing it on drop. It never runs past that load. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… reaped on drop or bound, output bounded (card 6f05b89d, S1) Codex's review of #5356 at 4187a9c: ask_python used a blocking Command::output with no cancellation, bound or output cap. The MLX chat-template probe lost kill_on_drop, and the readiness probe dropped its handle, so a hung or noisy probe could hold a process and memory forever. - ask_python is async and runs under lane_process::run_owned. Dropping it, or outliving the bound, ends the interpreter and everything it started and reaps it. It answers Exited{output, cut} or Unavailable (could not start, outlived its bound, end unconfirmed). - Readiness has a verdict: Ready, Missing (no interpreter, or its imports failed) or Unavailable. A probe that cannot answer is never read as missing dependencies. The probe is an owned tokio task, and Drop aborts it, which ends the process. Registration now runs inside the runtime (start_server enters rt_handle around it). - Output bound: the import probe's statement redirects fds 1 and 2 to the null device before importing, so nothing is captured. The chat-template probe sends stderr to a log in its job directory and keeps only its one-word answer on stdout; a failure quotes the log's last 2 KiB. - The import bound is None until the cold import time is measured on the M5 (mlx_lm) and the 5090 (CUDA packages), which I've asked for. Unbounded is still owned: a hung import stays unadvertised and ends with its trainer. Tests (unix): failing imports are Missing, success is Ready, a missing interpreter is Missing, a probe past a 500 ms bound is Unavailable and its process is gone, and dropping the readiness ends a probe still running. With a real /usr/bin/python3, 50 MB printed to both streams is captured as zero bytes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…g (card 6f05b89d, S1) Codex's review of #5356 at 3e28979: the stderr log was an unlimited file, and the failure path read all of it to take a 2 KiB tail. The log is gone. probe_chat_template.py now writes its answer to a private dup of stdout, sends fds 1 and 2 to the null device before transformers loads (nothing a library prints is captured), and reports a failure as one line of at most ~2 KiB on the answer channel, exiting 1. The capture is bounded by construction and run_owned still owns the process. Verified on IntelMac, where transformers is absent: one line, `error: ModuleNotFoundError("No module named 'transformers'")`, exit 1. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…4x the 5090's 28.3 s (card 6f05b89d, S1) Codex measured the CUDA trainer's imports in a fresh process on the 5090 (Windows, cuda-training venv, under serving load): exit 0 in 28.3 s at 2026-10-24T08:25Z. The production bound is 120 s, about 4x that observed sample (not a worst case). Past it the probe is ended and readiness is unavailable, never missing. MLX's import on the M5 is still to be measured. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
Source re-review at 561c0f0 resolves my previous process-custody and unbounded-log blockers: the readiness task retains cancellation ownership through run_owned, the production import probe has a 120-second deadline, timeout remains Unavailable, and the chat-template probe no longer creates or reads an unlimited stderr log. Fresh exact-head CI and the named timeout/drop/noisy-output regressions are still required before integration. Windows compilation is skipped by the current selector; the summary check is not compilation evidence. The deadline cites my measured Windows trainer import: fresh process, 28.293 seconds, exit 0 at 2026-10-24T08:25Z under serving load. OS cache state was not established and this is not a worst-case bound. M5 import measurement remains explicitly outstanding. The Python diagnostic limit is 2,000 characters rather than precisely 2 KiB; the runner capture limit remains authoritative. |
Card 6f05b89d, slice S1 of grid training. This serves the learning line: IntelMac's residents have no trainer, so a reviewed correction never becomes a gene there. The first step is that the grid knows who can train. The design for all slices is in the card body (S2 grid-peer trainer, S3 artifact return, S4 pending-gene adoption).
CapacityOffer.trainable_bases(gossip.rs, wire nametrainableBases, serde default). It lists the served base when a trainer on THIS host would accept a LoRA job for it: either its resident weights or its own copy. A grid-peer or cloud trainer never counts, so a node never advertises training it would only pass on. An older core advertises nothing, which reads as "trains nothing", never "all".FineTuningCoordinator::trains_base_hereuses the same gateselectuses. The hardware and prefix half ofcaps_matchis nowruns_base_here, shared by both, so there is no second selection rule.GridCapacityModuleasks the genome module at offer time through the module registry, which is installed ininitialize. The order modules initialize in never matters. With no genome module, nothing is trainable here.Usable, not merely registered (Codex's reviews). The MLX and CUDA trainers kept the default
serves_base= true, and an existing interpreter file proves nothing. So they were selected, and would have been advertised, for jobs they cannot run.PythonTrainerReadiness(new file) is the trainer owner's cached answer. When the trainer is built, a background thread runspython -c "import ..."once:import mlx_lmfor MLX, and torch plus the packages incuda-requirements.txtfor CUDA.serves_baseanswers with readiness plus the base's trainable HF source.Tests:
python_trainer_readiness::tests::an_interpreter_missing_its_dependencies_is_not_a_ready_trainer(fake interpreters, unix), andcoordinator::tests::only_a_trainer_on_this_host_makes_a_base_trainable_here. It covers a cloud trainer, a grid-peer trainer, a trainer without LoRA, a trainer for another base, and one that does count.No consumer yet; S2 selects a peer by this field. No file touched is over 1,000 lines (gossip.rs ends at 887).
ask_python(python_trainer_readiness.rs) is the single owner for asking a trainer's interpreter something. MLX's chat-template probe moved onto it, so spawn sites are unchanged.Measured
import mlx_lmon the M5 is still owed (owner Fable, asked); this sample does not bound every machine.CI at 561c0f0:
the_import_probe_answers_ready_missing_or_unavailable_and_owns_its_processdropping_the_trainer_ends_a_probe_still_runninga_noisy_probe_is_captured_as_nothingonly_a_trainer_on_this_host_makes_a_base_trainable_hereSource and CI only; nothing was built on IntelMac. After deploy (owner Cormac):
grid/nodesor the beacon on the M5 showstrainableBasesequal to its served base, and IntelMac's shows[].🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE