Skip to content

Add shared SL updates, offline training and recovery - #857

Merged
yuecideng merged 12 commits into
codex/nerd-model-data-trainingfrom
codex/sl-foundation
Oct 25, 2026
Merged

yuecideng merged 12 commits into
codex/nerd-model-data-trainingfrom
codex/sl-foundation

Conversation

@yuecideng

@yuecideng yuecideng commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Policy behavior cloning and learned dynamics currently own separate optimizer and recovery loops. Add embodichain.learning.sl so structured inputs, objective-owned losses, single optimizer updates and offline training recovery can be shared without flattening model-specific state or changing loss reductions.

The layer provides owned tensor-tree sampling, explicit numerical/clipping contexts, source and semantic compatibility checks, atomic checkpoints, and the lazy embodichain train-sl recipe entry point. Sampling, normalization updates, physical acquisition and policy execution remain with their callers.

Dependencies

Validation

  • 19 focused SL tests cover independent masked SGD, multi-step gradients, finite-update boundaries, owned metadata/content identity, exact dropout/optimizer/sampler recovery, optimizer compatibility before mutation, and actual unified CLI routing.
  • Existing context and API-checker suites pass; public API coverage 3128/3128.
  • Relevant NeRD trainer coverage passes alongside the new test package.
  • Black 26.10.1 black ., diff checks, context routing/checks pass.
  • Sphinx dummy build succeeds with 982 existing site warnings; no global strict-build claim.
  • Independent and automated review findings are fixed with regression coverage: owned metadata, optimizer/scheduler preflight, typed source identity, validation RNG/mode isolation, and preserving prior experiment artifacts, including delayed-fit output ownership.
  • Context decision: add the requested SL owner, link learning-layer navigation, and preserve accurate RL/environment ownership.

Type of change

  • New feature (non-breaking)

Checklist

  • Run black . with Black 26.10.1.
  • Review affected documentation and agent context.
  • Document public APIs and pass the API coverage gate.
  • Review test necessity and verify affected behavior.
  • Preserve optional model/runtime dependency boundaries.

@yuecideng yuecideng added enhancement Improvements to existing capabilities; use feature for new capabilities. model Neural model architectures, inference, weights and model contracts. labels Oct 24, 2026
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no blocking issues remain.

Summary

Adds shared supervised-learning batches, optimizer updates, offline training, checkpoint recovery, and the lazy train-sl command.

  • Supervised models keep their own loss rules while sharing one optimizer update.
  • Offline training runs save their state so they can resume later.
  • The main command line can start supervised training from a recipe.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Source["Source samples a batch"] --> Learner["Learner updates the model"]
  Learner --> Scheduler["Optional scheduler"]
  Scheduler --> Validation["Optional validation"]
  Validation --> Metrics["Write metrics"]
  Metrics --> Checkpoint["Save checkpoint"]
  Checkpoint --> Resume["Check compatibility and restore"]
Loading

Reviews (6) · Last reviewed commit: "fix(sl): recheck output ownership before..." · Reviewed by Greptile

Comment thread embodichain/learning/sl/trainer.py Resolved
Comment thread embodichain/learning/sl/sources.py Resolved
Comment thread tests/learning/sl/test_trainer.py Resolved
Comment thread embodichain/learning/sl/trainer.py Resolved
@yuecideng yuecideng added feature New user-facing capabilities. sl Supervised learning updates, training, recovery and behavior cloning workflows. and removed enhancement Improvements to existing capabilities; use feature for new capabilities. model Neural model architectures, inference, weights and model contracts. labels Oct 25, 2026
@yuecideng yuecideng mentioned this pull request Oct 25, 2026
6 tasks done
@yuecideng
yuecideng merged commit a7668ad into codex/nerd-model-data-training Oct 25, 2026
4 checks passed
@yuecideng
yuecideng deleted the codex/sl-foundation branch October 25, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New user-facing capabilities. sl Supervised learning updates, training, recovery and behavior cloning workflows.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant