Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5b28463
swift-megatron: keep a resumed island's progress through the rejoin c…
Nov 5, 2026
f3ea120
syncer: checkpoint and exit cleanly on SIGTERM / SIGINT
Nov 5, 2026
764ae90
swift-megatron: accept a resume record without the layout contract
Nov 5, 2026
ac8d4a9
swift-megatron: release spent anchors of undelivered pushes and after…
Nov 6, 2026
91f002c
swift-megatron: rebuild the LR schedule of a resume that did not load it
Nov 6, 2026
f1066d0
swift-megatron: rebase a running island onto a redial catch-up, take …
Nov 6, 2026
4d3692d
protocol: hash a large BCAST in parallel blocks while its chunks arrive
Nov 6, 2026
3961ce6
swift-megatron: skip INIT for a resumed learner 0, stream INIT by chu…
Nov 6, 2026
357f7e1
syncer: --checkpoint-on-start writes the checkpoint before the first …
Nov 6, 2026
ae3eada
sft presets: initial-cut wait and background / start checkpoints on b…
Nov 6, 2026
6b17b8c
swift-megatron: heartbeat thread so the syncer can lease the island
Nov 6, 2026
51a4f57
syncer, protocol: keep same-connection anchor reuse and two-tuple rea…
Nov 6, 2026
43f6bd1
swift-megatron: keep sync and plugin logs visible under an ERROR-leve…
Nov 6, 2026
bcd1f89
swift-megatron: install, not shift, a newer global after a push from …
Nov 7, 2026
e918037
protocol: pass the block digest through the spot-rollout subscriber
Nov 7, 2026
ec6d6d3
swift-megatron: fail, not hang, when an INIT export raises on rank 0
Nov 7, 2026
3b5b378
syncer: on a stop, abandon rounds whose islands are all gone at once
Nov 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,18 @@ coordinator always rewrites `--checkpoint-path` at the final quiescent cut
before terminal delivery. Thus a total-step count not divisible by the
periodic interval still leaves an atomic final checkpoint.

SIGTERM or SIGINT stops the syncer gracefully: it launches no new round,
gives the rounds still gathering `--shutdown-timeout-s` (default 600) to
close (a round with no delta whose islands are all disconnected is abandoned
at once), then abandons the rest (they have not touched the state, so a resumed
run launches those steps again), commits every computed round, writes
`--checkpoint-path` synchronously (after any background checkpoint) and exits
0 with `stop: checkpoint written step=<t>`. The checkpoint's global step is
then the last `outer step` on the event tape, and `--resume` continues the
tape at `t + 1`. A signal before training starts exits at once (nothing was
merged), and a second signal exits immediately without a checkpoint. The
terminal cut is not marked final.

`--checkpoint-at-steps T1,T2,...` (launcher: `--rl-sync-checkpoint-at-steps`,
asynchronous full-parameter rounds) also writes the cut at each listed global
step `t` (one fragment merge, the `step=` of the `outer step` log, the unit of
Expand Down
19 changes: 19 additions & 0 deletions syncer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mod protocol;
mod sample_relay;
mod server;
mod sha256;
mod shutdown;
mod state;
mod subscriber;

Expand Down Expand Up @@ -158,6 +159,13 @@ struct Args {
/// during the write) host memory peaks at about twice params + momentum.
#[arg(long)]
background_checkpoint: bool,
/// Write --checkpoint-path once before the first round (after INIT or
/// --resume), so the rounds before the first --checkpoint-every one are
/// covered too. Skipped when --resume found that checkpoint (it is the
/// state just loaded). On a background thread with
/// --background-checkpoint.
#[arg(long)]
checkpoint_on_start: bool,
/// Policy sweep: write per-round checkpoints off the scheduler; each
/// round is broadcast only after its checkpoint is durable.
#[arg(long, default_value_t = false)]
Expand All @@ -167,6 +175,13 @@ struct Args {
/// sessions are refused.
#[arg(long)]
bcast_delta_full_every: Option<u64>,
/// On SIGTERM / SIGINT: stop launching rounds, give the rounds still
/// gathering this many seconds to close (then drop them; they have not
/// touched the state), commit every computed round, write
/// --checkpoint-path synchronously and exit 0. A second signal exits at
/// once without a checkpoint.
#[arg(long, default_value_t = 600)]
shutdown_timeout_s: u64,
/// Resume from --checkpoint-path if it exists.
#[arg(long, default_value_t = false)]
resume: bool,
Expand Down Expand Up @@ -505,6 +520,7 @@ fn main() -> anyhow::Result<()> {
checkpoint_every: args.checkpoint_every,
checkpoint_at_steps: args.checkpoint_at_steps,
background_checkpoint: args.background_checkpoint,
checkpoint_on_start: args.checkpoint_on_start,
async_checkpoint: args.async_checkpoint,
bcast_delta_full_every: args.bcast_delta_full_every,
resume: args.resume,
Expand All @@ -518,6 +534,9 @@ fn main() -> anyhow::Result<()> {
island_hmac_key,
expected_island_contract,
syncer_epoch: args.syncer_epoch,
shutdown: Some(std::sync::Arc::new(shutdown::Shutdown::new(std::time::Duration::from_secs(
args.shutdown_timeout_s,
)))),
membership,
recovery,
inline_resend: args.inline_resend,
Expand Down
Loading
Loading