Repository navigation
fleet.jsonl: learner id as island_id, chunked copy into the run store - #910
Merged
Merged
Conversation
michaellchung
force-pushed
the
own/fleet-log-store
branch
from
November 26, 2026 17:28
c2c6244 to
21faf46
Compare
An island launch of a fleet launched island by island runs one island, island 0 of its launch, so every fleet.jsonl record of such a fleet had island_id 0 and did not match the syncer tape's learner ids. The launch now passes its fleet learner id (--rl-fleet-learner-id) to the fleet log; every other launch keeps the -l<m> index of the island name. fleet.jsonl lived only on the host running the launch. A launch that keeps its island records in the run store now also copies the file there in chunks (fleet/log/<lane>/<host>-p<pid>-<UTC start>/<seq>.jsonl, one folder per launcher process), reusing the tape uploader. Upload failures are rate-limited WARN lines and never reach the launcher; the final upload at the end is bounded to 15 s. Launches without island records (one trainer island) upload nothing. dashboard serve/export --store read every folder next to the island tapes (each record folded once, also against a local fleet.jsonl), and python -m yeto.dashboard.fleet_store merge writes one time-ordered, de-duplicated fleet.jsonl from the store and local copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…load); default tape keys unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Folder names carry a random nonce before the UTC start: two launchers of one host with the same pid in the same second write two folders (the dashboard keeps one cursor per folder). - The dashboard folds an island's fleet lifecycle records by their own time: an older host's records that arrive after the newer host's (store copy read after the local file) add their closed intervals and no longer reset the island's state; each shape field follows the newest record that names it. - yeto down copies the island_stop lines it appends into the store (same lane, WARN on failure). - The fleet log is built before the fleet controller, so its store copy is stopped even when the controller cannot be built. fleet.store.json records the store and the start offset of the copy: a run directory reused by a run with another store starts at the file's end. - An explicit upload interval must be positive; the store status of the two readers reports the oldest clean poll. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rce in write order The copy record (fleet.store.json) now names the run it belongs to (the run registry's started_at, new for each run of a name). copy_start resumes only for the same run and store; yeto down copies its island_stop lines only into the store the record of this run names. A launch that does not copy the file (no store, no island records, the copy turned off) voids an existing record (no store, the file's end), so a later yeto down or launch never puts its lines into an earlier run's store. A run directory that never had a record still gets none. The reducer folds the records of one source in write order (a clock stepped back in one file folds as on main) and replays an island's lifecycle only for a record older than the newest one of another source. The replay cost and the same-time tie across sources are documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaellchung
force-pushed
the
own/fleet-log-store
branch
from
November 26, 2026 19:49
21faf46 to
f372a9e
Compare
This was referenced Nov 26, 2026
michaellchung
added a commit
that referenced
this pull request
Nov 26, 2026
…fewer look-alike hints; quoted preflight command (#925) * run up: print the dry run's cluster preflight command quoted The command run up's dry run prints was joined with spaces; an argument with a space or a shell character (an inventory path, say) did not paste back as one word. It is shlex.join'ed now, as the launch gate already does. The customer K3.1 dry runs print the same line (nothing there needs quotes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * exact_argparse: offer a spelling only at difflib similarity 0.8 0.6 offered look-alikes: --rl-max named --rl-image (0.78) next to the --rl-max-* options it is a prefix of. 0.8 keeps typos such as --modle (--model, 0.86) and --rl-imgae (--rl-image, 0.9). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Every argparse entry point under yeto/ takes full option names only The command tree, the NC pool tool and the Miles island moved to ExactArgumentParser in #904; the module entry points did not. The 62 modules that build a parser (node-side ones whose argv the launcher renders: engine sampler, init_from_release, tape_upload, store_dispense, role_switch, controller, health readers, spot watchdog, ssh_harness, learners, exporters, ...) now build an ExactArgumentParser; their sub-parsers inherit it. weights_sync.py and preflight/bench.py run as single files on a node (no yeto package there): they keep argparse and set allow_abbrev=False on the parser and, through parser_class, on every subcommand. Tests: every parser under yeto/ is exact (a plain ArgumentParser fails), the two standalone tools refuse a prefix in a subcommand, and error() replaces argparse's "unrecognized arguments" message only (another error, a caller's look-alike message and parse_known_args stay as they were); look-alike options are not offered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * codepack: keep stdlib argparse (a node imports it from a partly unpacked pack) PACK_FETCH_PY puts the pack's yeto/ files on sys.path and imports yeto.codepack before the tree is unpacked and verified; its contract (test_rl_ssh_resident's tiny pack of __init__.py + codepack.py) is a module with no top-level yeto import. It keeps argparse and sets allow_abbrev=False on the parser and its subcommands, like the two tools shipped alone to a node; the coverage test names it with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fleet_store: its merge CLI takes full option names too (new since the switch, #910) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
michaellchung
added a commit
that referenced
this pull request
Nov 26, 2026
Since #910 a fleet's island records come from several sources (a host's file and the store copies) and fold by their own time. The straggler mark follows the newest mark event by its source's time: a clear read before the report it closes, or a report twice, ends as the newest says; one source's clock stepped back folds in write order; the lifecycle replay leaves the mark alone. The mark lands on the island of its learner id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two gaps of the launcher's
fleet.jsonl(own-cluster acceptance G-M4 and G-M3).island_id is the learner id (G-M4). An island launch of a fleet launched island by island (
fleet.launch: per_island) runs one island, island 0 of its launch (<prefix>-l0-<cloud>), so every record of such a fleet hadisland_id0 and did not match the learner ids of the syncer tape; the dashboard folded every island of the fleet into island 0. The launch now passes its fleet learner id (--rl-fleet-learner-id) to the fleet log (FleetLogmetalearner_id, used forisland_id; no new record field). Every other launch keeps the-l<m>index of the island name, as on main. The reducer groups fleet records byisland_idfirst, so the per-island records now land on the learner's island next to its tapes (test: two island launches fold into islands 0 and 1).fleet.jsonl in the run store (G-M3). The file lived only on the host running the launch: a control plane that moved split it over two hosts, and a lost host took its part with it. A launch that keeps its island records in the run store (an island fleet, or
--island-lifecycle onwith--rl-checkpoint-store) now also copies the file there in chunks, reusing the tape uploader (TapeUploadergains an optionalprefix, defaulttapes, keys unchanged):laneisl<k>for the island launch of learner k andfleetfor a whole-fleet launch; each launcher process writes its own folder (the random nonce keeps two launchers of one host apart, even with the same pid in the same second). Only this run's part of the local file is copied:fleet.store.jsonnext to it records the run (the run registry'sstarted_at, new for each run of a name), the store and the start offset. A restarted launcher of the same run for the same store goes on from that offset; any other launch starts at the file's end. A launch that does not copy the file (no store, no island records, or the copy turned off) voids an existing record (no store, the file's end), andyeto downcopies theisland_stoplines it appends for islands a killed launcher left open only into the store the record of this run names, so a run's lines never reach another run's store. A run directory that never had a record gets none. The fleet log is built before the fleet controller, so its copy is stopped even when the controller cannot be built. The copy is observation only: failures are rate-limited WARN lines and are retried with the next chunk, and the launcher's end waits at most 15 s for the final upload. A launch without island records (one trainer island, the customer path) uploads nothing.Readers:
yeto dashboard serve|export --storeread every folder next to the island tapes (a record also present in a localfleet.jsonlcounts once), andpython -m yeto.dashboard.fleet_store merge --store URI [--fleet-log PATH]...writes one time-ordered, de-duplicatedfleet.jsonlfor tools that read the file.The reducer (
Reducer._feed_fleet, a minimal block) folds the records of one source (one local file, one launcher folder) in write order, as on main, so a host clock stepped back by NTP folds as before. A record older than the newest record of another source (a lost host's copy read after the newer host's) replays the island's lifecycle in that order: it adds its closed ready -> lost intervals and does not reset the island's current state; each shape field follows the newest record that names it. In-order streams fold exactly as before. Known limits, documented in the code anddocs/DASHBOARD.md: records of two sources with the sametime_unixfold in read order, and a whole host's copy read after the newer host's costs a quadratic replay (10k lifecycle records of one island: some seconds, once per reader start).Note for the PRs that touch
Reducer._feed_fleetafter this one (#891, #901): straggler, spare and node-health events must return before the life insort.No dashboard page change (same views, more complete data). Not touched:
topology_diloco.py,fleet_islands.py,static/*.js,yeto/launch/fleet.py. Small edits inyeto/launcher.py(pass the store objects to the fleet log; close it at the end).Tests
tests/test_fleet_log_store.py: a launch without a copy between a copy into S1 andyeto down(S1 gets nothing of the later run), a record left by another run (yeto downand the next launch ignore it), S2 -> no copy -> S2 (the middle run's lines stay local), a restarted launcher of the run, the copy turned off, no record written for a run directory that never had one, a clock stepped back in one file (as main, also when another host's records are replayed after it), a late record of another source replayed at its place, learner id vs name index, record shape unchanged for a single-island launch, store copy keys and bytes, failing store is a WARN only, rate limit, interval 0 / explicit interval, a moved host (local file of the new host only, store with both: the island runs, the old interval is billed), folder stamps 2 h off, lifecycle independent of read order, same host/pid/second folders and per-folder cursors, reused run directory,yeto downcopy (store, local-only, failing store), store status,mergeCLI, concurrent writer and uploader.tests/test_fleet_log_store_launch.py:launcher.run()with island records leaves the fullfleet.jsonlin the store; without island records nothing is uploaded; a controller that cannot be built still gets the copy stopped; every customer K3.1 run keeps no island records (no upload); default tape keys unchanged.yeto down, void only an existing record, void offset, never void, launch voids, launch passes the run,yeto downpasses the run, run identity, per-source order, per-source time, replay gate, replay times, shape times, no replay, shape gate, copy start offsets, launch offset,yeto downcopy, record check), all killed; the earlier 31 still apply or were adapted to the rewritten code, all killed.tests/test_node_lease.pyprobe tests that saw ayeto-ssh-sampler:run-a:process of another test session on the same machine (they pass on rerun, on this branch and on main).test_k31_customer_plan_golden+tests/golden/breakers52 passed, golden files unchanged.yeto run up --dry-runwith the trainer launch rc=0, and the pool dry-run, against origin/main)🤖 Generated with Claude Code