Skip to content

In-engine training on a lane stood up for the run, for a base no live lane serves (card d67fd801, A3b) - #5269

Merged
joelteply merged 2 commits into
canaryfrom
d67fd801/engine-lane-in-engine-training-on-a-lane
Oct 22, 2026
Merged

joelteply merged 2 commits into
canaryfrom
d67fd801/engine-lane-in-engine-training-on-a-lane

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

IntelMac, 2026-10-22: Delia's due bucket is for base qwen2.5-coder-0.5b while the live lane
serves 1.5b. An Intel Mac has neither MLX nor CUDA, so no trainer advertised the base, and
dispatch 7a68a4c6 stayed 'retryable' forever. Nothing on that node could train her examples.

  • EngineLane (engine_lane.rs), a LaneSource:
    • stands up a single-purpose lane for the base the way a gene eval does
      (cognition::single_purpose_lane: memory headroom, window plan, GPU-first placement under
      a governed lease, EphemeralServingLane::spawn_with_reservation; --train-dir and, for CPU
      weights, --no-repack come from the shared prepare);
    • reads its LaneChoice from the lane's own LaneRecord via lane_choice (Training admission follows the lane: its memory pool and its own identity check (card 781885cb) #5264), so the pool
      is the placement it was launched with, and pins the window to the lane's served /props;
    • still_bound checks that lane's record by port; the lane lives as long as the run holds
      the lease.
  • It declines any base a live lane serves, whatever that lane's placement record says, so a
    resident base is never loaded twice beside itself. stands_up_for is the pure rule.
  • TrainingPlace::EngineLaneHere, declared after GridPeer and before SeparateCopyHere, so a
    lane of our own engine outranks a separate trainer process (MLX/CUDA Python) even where
    that one has the native accelerator, and the resident lane outranks it.
  • LaneSource declares provider() and place() (one owner each). The tuner reads them, and
    EngineLoraFineTuner::on_engine_lanes() is the same tuner on these lanes, registered as
    'engine-lane'. Its artifacts stay the engine-local kind.
  • trains_in_engine(provider) owns 'is an in-engine job'; genome/job-pause uses it, so
    engine-lane jobs pause like resident ones instead of being refused as Unsupported.
  • The lane lease: TRAIN_LANE_TERMS, pinned for the run, like every training lease. Port base
    58_300 is its own range (eval 58_200, vision 58_091).

Tests:

  • an_engine_lane_beats_a_native_separate_trainer_and_the_resident_lane_beats_it;
  • a_lane_is_stood_up_only_for_local_weights_no_live_lane_serves (IntelMac's case, a resident
    base, missing weights).

Not compiled here (IntelMac serves); CI checks. Measured after deploy, owner Cormac: on
IntelMac the next 0.5b bucket dispatch selects engine-lane, the probe
training.lane.stood_up fires, and the run completes or fails loud.

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

… lane serves (card d67fd801, A3b)

IntelMac, 2026-10-22: Delia's due bucket is for base qwen2.5-coder-0.5b while the live lane
serves 1.5b. An Intel Mac has neither MLX nor CUDA, so no trainer advertised the base, and
dispatch 7a68a4c6 stayed 'retryable' forever. Nothing on that node could train her examples.

- EngineLane (engine_lane.rs), a LaneSource:
  - stands up a single-purpose lane for the base the way a gene eval does
    (cognition::single_purpose_lane: memory headroom, window plan, GPU-first placement under
    a governed lease, EphemeralServingLane::spawn_with_reservation; --train-dir and, for CPU
    weights, --no-repack come from the shared prepare);
  - reads its LaneChoice from the lane's own LaneRecord via lane_choice (#5264), so the pool
    is the placement it was launched with, and pins the window to the lane's served /props;
  - still_bound checks that lane's record by port; the lane lives as long as the run holds
    the lease.
- It declines any base a live lane serves, whatever that lane's placement record says, so a
  resident base is never loaded twice beside itself. stands_up_for is the pure rule.
- TrainingPlace::EngineLaneHere, declared after GridPeer and before SeparateCopyHere, so a
  lane of our own engine outranks a separate trainer process (MLX/CUDA Python) even where
  that one has the native accelerator, and the resident lane outranks it.
- LaneSource declares provider() and place() (one owner each). The tuner reads them, and
  EngineLoraFineTuner::on_engine_lanes() is the same tuner on these lanes, registered as
  'engine-lane'. Its artifacts stay the engine-local kind.
- trains_in_engine(provider) owns 'is an in-engine job'; genome/job-pause uses it, so
  engine-lane jobs pause like resident ones instead of being refused as Unsupported.
- The lane lease: TRAIN_LANE_TERMS, pinned for the run, like every training lease. Port base
  58_300 is its own range (eval 58_200, vision 58_091).

Tests:
- an_engine_lane_beats_a_native_separate_trainer_and_the_resident_lane_beats_it;
- a_lane_is_stood_up_only_for_local_weights_no_live_lane_serves (IntelMac's case, a resident
  base, missing weights).

Not compiled here (IntelMac serves); CI checks. Measured after deploy, owner Cormac: on
IntelMac the next 0.5b bucket dispatch selects engine-lane, the probe
training.lane.stood_up fires, and the run completes or fails loud.

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

Review of exact head 66fe092: changes requested.

[P2] Preserve transient acquisition failures across the LaneSource boundary. In engine_lane.rs acquire(), await_lane_memory_headroom can fail after sustained temporary pressure, spawn_with_reservation can refuse capacity or time out, and served_context_window can fail on a temporary HTTP error. These all return String through LaneSource, and the existing engine_lora_fine_tuner.rs create_job maps every acquisition error to FineTuningError::InvalidRequest. That variant explicitly means the request is invalid and cannot be retried unchanged. With this new source, a valid due training bucket now gets that classification for an environmental failure. Carry a typed acquisition error (or FineTuningError) so pressure/startup/transport failures remain Transient while genuine model/request validation remains InvalidRequest. Add a regression at create_job asserting the typed result for failed acquisition, without starting a real serving process.

The remaining source trace verifies provider registration/ranking, the returned lane hold moving into EngineRun, process-owned startup reservation transfer, and placement/window reads from the lane record and /props. No compilation was run on this serving host. This is not a training or restart-retention acceptance receipt.

Additional test gap to cover: serves() checks for an already resident base, but acquire() does not recheck that condition after selection/headroom waiting. Please exercise a resident-base change between those stages and document/refuse the second copy as appropriate to the stated contract.

… before the spawn is refused (Codex on #5269)

Codex at 66fe092:
- [P2] LaneSource::acquire returned String, and create_job mapped every failure to
  InvalidRequest (never retried as-is), so memory pressure, a lane that would not start, or a
  transient /props error marked a valid due bucket as a bad request.
- acquire never rechecked residency after selection and the headroom wait.

Now:
- LaneSource::acquire returns FineTuningError. An unknown model, or no live lane for the
  resident source, is InvalidRequest. The headroom wait, the spawn, the lane record and the
  served-window read are Transient. create_job passes the error through unchanged.
- refuse_if_resident(base, live) runs after the headroom wait, before placement. A base a
  live lane now serves is refused as Transient, so the retried dispatch selects the resident
  trainer instead of loading a second copy.

Tests:
- a_lane_acquisition_failure_keeps_its_type_through_create_job: through create_job with a
  refusing lane source (no serving process); Transient stays Transient, InvalidRequest stays
  InvalidRequest;
- a_base_that_became_resident_before_the_spawn_is_refused_as_transient.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@github-actions github-actions Bot added size: L and removed size: M labels Oct 22, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Re-reviewed exact head ed64681, including the full delta from 66fe092.

The reported acquisition-error blocker is resolved: LaneSource preserves FineTuningError, create_job passes it through, and pressure/startup/record/props failures are Transient. The added create_job regression discriminates Transient from InvalidRequest without starting a process. The resident-base recheck after the headroom wait and its regression also address the requested selection-to-acquisition check.

Source review PASS for this head; integration remains conditional on hosted core/Windows CI. Tests were inspected, not run locally (serving-node compilation prohibition). This is not proof of a completed training run, held-out improvement, adoption or restart retention. Cormac retains integration and live acceptance ownership.

@joelteply
joelteply merged commit 41cffbf into canary Oct 22, 2026
8 checks passed
@joelteply
joelteply deleted the d67fd801/engine-lane-in-engine-training-on-a-lane branch October 22, 2026 05:26
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