Skip to content

ssh pools on own nodes: two pools of a run on one leased node, trainer nodes, oversized TP; upload prompts_file - #922

Merged
michaellchung merged 5 commits into
mainfrom
own/ssh-pool-checks
Nov 26, 2026
Merged

michaellchung merged 5 commits into
mainfrom
own/ssh-pool-checks

Conversation

@michaellchung

@michaellchung michaellchung commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Seven checks for ssh sampler pools on own nodes (own-cluster-fleet-stability):

  1. Two pools of a run on the nodes of one lease store. A node lease is held per node name. A pool skips a node the other pool holds and takes another free node of its slots. yeto run up (dry run and real run) refuses with exit 2, and starts nothing, in two cases:

    • both pools name the same node in provider.nodes;
    • their targets together exceed the nodes the two pools can take.

    Otherwise it prints a note. The refusal names the pools and the node(s) and gives two ways out:

    • an inventory without lease_store, with the cards split by provider.devices;
    • different nodes.

    Lease semantics are unchanged. Lease stores are compared after parse_lease_store, so file:///x and /x are one store.

  2. Billing wording. An ssh pool at price 0 no longer prints "Cloud rollout islands (ssh) bill until they are released". It now says the nodes are not billed but their cards are held until the pool stops. A priced ssh pool and the cloud providers keep the old warning. The examples/k31 customer outputs never printed this line and are unchanged.

  3. Roles and trainer nodes.

    • A node named in provider.nodes whose inventory roles lack sampler is refused. Nodes with no roles are still accepted.
    • An ssh pool on a node of the run's ssh: trainer islands, or on their trainer-spare nodes, is refused when no node lease is common to both (one lease store, one node name), because the trainer takes every card of its nodes.
    • When there is a common lease, the trainer skips a node the pool holds. The run is then refused only if the trainer nodes left after the pools' nodes are fewer than the islands need. Quarantined nodes (node_quarantine.shared_quarantines) are not counted. Otherwise it prints a warning.
    • One machine means one SSH host (ignoring the user), one non-loopback address, or one name within one inventory file.
  4. TP against cards. The pool dry run refuses a spec whose tensor parallel size is larger than the node's cards. When provider.devices is set, the count is min(len(devices), cards). The size is read from engine.options.tp; a decimal string such as "8" is read as a number, and anything that is not a whole number is a problem. Without it, the vllm-server / sglang-server default is used; these defaults are constants checked against the adapters by a test, because the launch layer imports no adapter. A provider.devices index beyond the node's cards is refused.

  5. prompts_file upload. At every start the ssh pool checks the size and sha256 of the copy at the host path behind the spec's prompts.path (under the pool's workdir or a mount, translated through the mount).

    • A matching copy is kept.
    • Otherwise the file is streamed there under a temp name unique to the shell (.tmp.$$), with a timeout of 60 s plus the bytes at 10 MiB/s (at most 30 min), then checked again before the sampler starts.
    • A failed write, or a copy that does not match, stops the start and is retried.
    • A path the sampler container cannot see, or a missing local file, is a config error and is not retried.
    • The own-trainer + own-sampler template now sets prompts_file.
  6. Duplicate addresses. The inventory refuses one address on two nodes. Loopback addresses are exempt, because each container has its own loopback.

  7. Dry-run prompts note. The ssh pool dry run no longer says each start fails without prompts_file. It says where the sampler reads the file (workdir, a mount with its host path, or the host for a venv runtime). It prints a WARNING line when no mount or workdir holds the path, and a problem when prompts_file targets such a path.

Tests

  • tests/test_ssh_pool_checks.py (47 tests) covers each check:
    • two pools: 3 nodes with targets 1 + 1 is a note; 2 nodes with targets 2 + 2 is refused; both pools naming one node is refused; plus the count boundary and two lease stores;
    • trainer side: review cases B (a [trainer, sampler] node on a leased inventory), C (a leased inventory without roles, including a quarantined node read from the lease store) and D (no lease store);
    • prompts: the three dry-run cases, and an upload that is kept, re-sent, streamed, fails on write, does not match, or is a config error.
  • tests/test_own_cluster_templates.py adds run up tests:
    • two pools on a leased node are refused (dry run and real run, nothing ordered);
    • two pools split a node without lease_store;
    • a pool on a trainer node is refused;
    • a leased trainer node shared with a pool gives a warning;
    • a fleet's ssh pool on its own island's trainer node is refused;
    • a pool naming a trainer-only node fails its pool dry run;
    • the template uploads its prompts and bills nothing.
  • tests/test_ssh_sampler_pool.py: one assertion now passes devices=None, because its fixture paired a TP8 spec with a one-device pool.
  • Mutation check: 40 mutations, all killed.
  • Customer gate: examples/k31 run up and pool dry runs show no diff against main; 52 goldens pass; no golden file changed.

Follow-up, not in this PR: move the adapters' tp defaults into a neutral core declaration that both the adapters and the launch layer read.

🤖 Generated with Claude Code

michaellchung and others added 5 commits November 27, 2026 05:49
… oversized TP; upload prompts_file

- yeto run up (dry run and real) refuses two ssh pools of one run on one node
  of an inventory with lease_store (the second would wait for the node lease
  forever), and an ssh pool on a node of the run's ssh: trainer islands or
  their trainer-spare nodes (yeto/launch/own_node_checks.py).
- provider.nodes naming a node whose inventory roles lack sampler is refused.
- the pool dry run refuses a spec whose tensor parallel size exceeds the
  node's cards (provider.devices when set).
- the inventory refuses one non-loopback address on two nodes.
- an ssh pool at price 0 no longer prints the "bill until they are released"
  warning; it says the nodes are not billed but held until the pool stops.
- ssh pools upload prompts_file to the host path behind the spec's
  prompts.path at every start and check its size and sha256 there (the
  rented-node semantics); the dry run says where the sampler reads the file,
  and warns when no mount or workdir holds the path.
- the own trainer + own sampler template sets prompts_file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ter import)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…node (review of #922)

- two ssh pools of one lease store: refused only when both name one node in
  provider.nodes or their targets exceed the nodes the two can take; a note
  otherwise (a pool skips a node the other holds).
- a pool on a trainer node: refused without node leases common to both; with
  them, refused only when the trainer nodes left after the pools' (quarantined
  nodes not counted) are fewer than the islands need, a warning otherwise.
- one machine: the host after any user; lease stores compared after
  parse_lease_store (file:// and the bare directory are one store).
- devices beyond the node's cards are refused and the card count is
  min(devices, cards); tp "8" is read as 8, a tp that is no number a problem.
- the prompts upload keeps a matching copy, streams the file under a temp
  name of the shell with a size-based timeout, and an unseen path or a
  missing local file is a config error (not retried).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaellchung michaellchung changed the title ssh pools on own nodes: refuse shared leased nodes, trainer nodes, oversized TP; upload prompts_file ssh pools on own nodes: two pools of a run on one leased node, trainer nodes, oversized TP; upload prompts_file Nov 26, 2026
@michaellchung
michaellchung merged commit 01de8b5 into main Nov 26, 2026
7 checks passed
@michaellchung
michaellchung deleted the own/ssh-pool-checks branch November 26, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant