Repository navigation
Add single-node DDP training to shared SL - #864
Merged
Merged
Conversation
Base automatically changed from
codex/sl-foundation
to
codex/nerd-model-data-training
October 25, 2026 07:17
[Medium impact] The changes since the previous review appear safe to merge. SummaryAdds single-node DDP training to shared SL.
No actionable new issues or repository-rule violations were found. No previous review threads were supplied. This review used code inspection; no tests were run.
|
yuecideng
force-pushed
the
codex/sl-ddp
branch
from
October 25, 2026 07:23
bad3eac to
abb6d43
Compare
This was referenced Oct 25, 2026
7 tasks done
6 tasks done
7 tasks done
5 tasks done
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.
Description
Run shared SL recipes under single-node
torchrun, with one CUDA/NCCL or CPU/Gloo worker per device. This branch has normally mergedmain@c5b1fdfc2, which contains the merged #855 foundation. it retains that foundation's durable run identity, append-only metrics, validation snapshots and checkpoint compatibility checks.DDP wraps the objective computation while
learner.modelremains the original model. Local mean losses are weighted by their effective valid-supervision counts before gradient averaging. Only rank 0 validates or writes artifacts; checkpoints preserve every rank's RNG, sampler and model buffers. NeRD showcase export now accepts both SL v1 and distributed SL v2 checkpoints, preserving safe loading, dtype, normalization and ordered inputs.Launch and contracts
Use
cpu.yamlwithout visible CUDA devices for Gloo. Model recipes use the same entry point, includingembodichain_models.dynamics.nerd.sl_recipe:build_supervised_trainer. Append--resume PATHwith the same world size/configuration and a compatible destination. See the launch guide.Batch size is per worker, sampling uses independent replacement streams and learning rate is not automatically scaled. Exact recovery requires the same world size. All ranks participate in ordinary fitting/saving/recovery; rank-zero validation callbacks save the previously gathered committed boundary without another collective. Rank-local admission, sampling, objective, finite-value, validation and I/O errors are propagated to all workers. Fatal device/communication failures require restarting the job.
The checkpoint control-state transport temporarily uses O(world-size × maximum serialized rank-state size) storage per rank. It carries RNG, sampler and registered buffers, rather than parameters, optimizer state, images or corpora. This is a bounded compatibility tradeoff, not a universal speedup claim.
Main synchronization
Main synchronization at
8dae1b392: 88 relevant files remain byte/AST-identical to the prior qualified DDP source; main's vendor catalogs, CI, package and release checks are preserved. The new main integration passes 28 SL/Gloo checks, 94 metadata/context checks and 135 catalog/CLI checks; these groups are reported separately. A fresh two-GPU NCCL four-update run and recovery from update two match exactly. The prior 12-update interruption and NeRD v1/v2 export evidence remains source-bound and applicable to unchanged execution files.Validation
Current branch source:
8dae1b3920677ff0be7c7fb262cd64b9a2896b13; prior qualified source:ba89775e387b7f89a9bde5bd36070ac8146ca666; normal base merge:a1a77ceaa.black ., context validation and API coverage 3170/3170 pass. Independent HPC/reliability/security review found no unresolved actionable defect.Combined affected checks and package evidence are recorded separately from branch-only checks; overlapping counts are not added. No new long training/convergence matrix or speedup measurement is claimed.
CI integration repairs
Current review head:
f372f2079ba94b79d928fc05f0fd114d126d29dc. The unchanged main CI exposed two tests left behind by the vendor migration: narrow-terminal label wrapping and a retired UR mock import. The exact two-file maintenance commitb1d8ab415is reviewed separately in #878 and included here; semantic assertions, CI selection/gates and production behavior are unchanged. Its original two failures reproduce and the corrected related modules pass 42 tests.Dependencies and review
main, synchronized atc5b1fdfc28ea47376933d95207b7894b7e6d54f1. Add NeRD model extension and an SL training showcase #855, Add shared SL updates, offline training and recovery #857 and Route NeRD training through the shared SL learner #860 are merged.Type of change
Checklist
black .with Black 26.10.1.