Skip to content

Bridge causal data sources into shared SL - #877

Merged
yuecideng merged 42 commits into
mainfrom
codex/sl-ods-integration
Oct 27, 2026
Merged

yuecideng merged 42 commits into
mainfrom
codex/sl-ods-integration

Conversation

@yuecideng

@yuecideng yuecideng commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Connect online ODS, resident tensor and resident LeRobot sources to the shared SL trainer through SequenceBatchSource. An explicit, versioned encoder selects causal model inputs, targets and loss masks; the adapter preserves canonical validity masks and sample provenance without inferring action semantics.

Exact resume is admitted only for explicitly immutable, unbudgeted resident data. Actual tensor content, schema, window, encoder version and semantic metadata are bound to checkpoint identity; storage locations and read/cache diagnostics are excluded. Live or quota-managed sources can train and save model/optimizer snapshots, but exact resume is rejected before changing model, optimizer, RNG, sampling or output state. Start/stop, refill, waits and delivery quotas remain source/caller-owned.

The optional source preflight runs inside the existing collective checkpoint validation, so a failure on one rank reaches every rank. Two CPU examples demonstrate BC-style action targets and causal state-transition targets. No dependencies or checkpoint formats are added.

Main synchronization

Merged main@e33edd0c7, including the already-merged DDP infrastructure (#864), RWM model extension (#859) and catalog compatibility fixes (#878). Resolved all six conflicting files while retaining both the current main content and the sequence bridge/recovery checks. The PR now contains only the ODS-to-SL layer: 15 files, with no duplicate DDP implementation or catalog repairs. It targets main directly and has no outstanding PR dependency.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Validation

Validated the synchronized head in the existing Python 3.11 conda environment:

  • 152 runtime tests passed across shared SL, real two-rank CPU/Gloo DDP, sequence/schema/source and sampling-quota contracts, real local LeRobot SDK loading, and the merged RWM implementation. One existing CUDA/BF16 RWM test was skipped by the default GPU admission rule; no GPU qualification is claimed for this update.
  • 65 context, example-package and architecture checks passed.
  • Both sl_data_source CLI encoders (bc and transition) completed four CPU updates and wrote last.pt.
  • Black 26.10.1 black . left all 1,708 Python files unchanged; whitespace, source headers, annotations, syntax and public-export checks passed.
  • Remote lint, complete documentation build, documentation tests, offline dataset/export checks and Greptile review passed on the synchronized head. The main test job remained in Install test package for over 30 minutes and had not produced a test result at merge preparation; no remote main-test pass is claimed. The repository merge rules do not require that pending check.
  • Public API coverage: 3263/3263. Agent-context validation passed. SL/data-pipeline guidance was retained with the bridge contracts, and merged RWM references were preserved; the incidental RL/example routing matches require no further guidance changes.

Existing coverage already checks window alignment, owned masks/provenance, delivery debits on encoding failure, immutable content/schema/window/encoder/language identity, storage relocation, exact dropout/optimizer/sampler recovery, and collective refusal without partial state mutation. No tests were added for this conflict-only update.

Live-buffer/producer snapshots and exact quota recovery remain unsupported. The examples use synthetic data and make no robot-policy convergence or performance claim. A full-site Sphinx build was not rerun for this conflict-only synchronization; API coverage and relevant context/package checks were run.

Checklist

  • I have run black . to format the code base.
  • I reviewed affected documentation and agent context and retained accurate guidance.
  • Public API changes are reflected in the API docs.
  • I verified proportional behavioral coverage and reused sufficient existing tests.
  • Dependencies have been reviewed; no new dependencies.

@yuecideng yuecideng added docs Documentation, API references and example explanations. data-pipeline Data collection, ODS, sampling, recording, persistence, conversion and analysis. feature New user-facing capabilities. sl Supervised learning updates, training, recovery and behavior cloning workflows. labels Oct 25, 2026
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds SequenceBatchSource to connect causal data sources to the shared supervised trainer through an explicit, versioned encoder.

  • Causal data sources can feed encoded batches to the shared trainer.
  • Exact resume checks that resident source data still matches its saved identity.

No actionable issues were found. Review conclusions are based on code inspection; tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    S["Live or resident source"] --> W["Owned causal window"]
    W --> E["Versioned encoder"]
    E --> B["SupervisedBatch with masks and provenance"]
    B --> T["Shared supervised trainer"]
    R["Resume checkpoint"] --> V["Collective source and checkpoint checks"]
    V -->|Accepted| C["Restore trainer state"]
    V -->|Rejected| N["Leave trainer state unchanged"]
Loading

Reviews (3) · Last reviewed commit: "chore(sl): sync ODS bridge with latest m..." · Reviewed by Greptile

Base automatically changed from codex/sl-ddp to main October 26, 2026 01:28
@yuecideng
yuecideng merged commit 7cc143d into main Oct 27, 2026
10 of 11 checks passed
@yuecideng
yuecideng deleted the codex/sl-ods-integration branch October 27, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data-pipeline Data collection, ODS, sampling, recording, persistence, conversion and analysis. docs Documentation, API references and example explanations. 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