Skip to content

Sync official LeRobot v3 release - #5

Merged
KunYing-Lee merged 1 commit into
mainfrom
agent/sync-official-lerobot-v3
Jul 13, 2026
Merged

Sync official LeRobot v3 release#5
KunYing-Lee merged 1 commit into
mainfrom
agent/sync-official-lerobot-v3

Conversation

@KunYing-Lee

Copy link
Copy Markdown
Contributor

What changed

  • sync the official repository tracked tree with KunYing-Lee/OMG@7900f62
  • adopt the official LeRobotDataset v3 data path and release validation workflow
  • add cache-first episode materialization with resumable, bounded validation
  • add exact distributed float64 normalization statistics and the verified 125D stats artifact
  • restore interleaved materialized sampling and cache repeated decode/kinematics work
  • make the 100M divergence guard monitor the normalized diffusion objective
  • bound periodic 100M validation to 200 batches

Why

The official repository still reflected the June 10 release snapshot and the old window-materialization/statistics workflow. OMG-Data is now published in official LeRobot v3 form, and the cache-first training path has been validated on the full dataset and in a live four-A100 100M training run.

The official and development repositories have unrelated Git histories. As in official PR #1, this branch is based on the official main and applies the current development repository tracked tree as one auditable sync commit. The committed tree hash exactly matches the source tree hash: 92e0be2dbaf935a951f94ae3eb2d2f0f56920d54.

Impact

  • the official README points to the published THU-MARS/OMG-Data dataset
  • canonical OMG-Data remains separate from derived episode caches
  • training can use local cache I/O while checkpoints and diagnostics remain persistent
  • exact stats and validation are reproducible from the episode cache

Validation

  • pytest -q: 134 passed, 4 skipped
  • strict train/val/test episode-cache validation: no errors
  • exact 125D statistics: 3,674,293,520 valid frames
  • live 100M four-A100 run: stable at about 2.5 steps/s with finite losses, healthy gradient norms, and periodic checkpoints

Copilot AI review requested due to automatic review settings July 13, 2026 08:56
@KunYing-Lee
KunYing-Lee merged commit b98813a into main Jul 13, 2026
1 check passed
@KunYing-Lee
KunYing-Lee deleted the agent/sync-official-lerobot-v3 branch July 13, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR syncs the repository to the official LeRobot v3 release workflow for OMG-Data, introducing LeRobot v3-compatible export/ingest tooling, a cache-first episode materialization path, and exact (including distributed) statistics/validation needed for large-scale training.

Changes:

  • Add LeRobot v3 dataset schema + export/inspect CLIs and a LeRobotG1MotionDataset adapter for training-time window sampling and feature encoding.
  • Introduce episode-cache materialization (frame-level qpos/FK tensors) plus validation/inspection utilities, and update training/materialization/stats pipelines to use it.
  • Improve training robustness and throughput (interleaved shard sampling, bounded validation, divergence guard monitoring a configurable loss component), and update docs/config defaults accordingly.

Reviewed changes

Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/robots/test_g1_kinematics_fast.py Updates kinematics/feature-codec test to use G1MotionFeatureCodec directly.
tests/generation/test_train_callbacks.py Adds coverage for skipping logger-dependent callbacks when logger is disabled.
tests/generation/test_materialized_dataset.py Updates materialized dataset test to new summary.json format and stats-batch iterator.
tests/generation/test_episode_cache.py Adds tests for episode-cache indexing, atomic publishing, resumption, and stats iteration.
tests/generation/test_compute_stats.py Adds tests for float64 moments and empty distributed partitions.
tests/data/test_lerobot_official_compat.py Validates OMG export is loadable by the official lerobot loader.
tests/data/test_lerobot_export.py End-to-end export + adapter + episode-cache materialization test coverage.
tests/data/test_build_lerobot_config.py Adds test for generated export config preserving split availability.
tests/callbacks/test_divergence_guard.py Extends divergence-guard tests for monitoring a specific loss component.
src/omg/tracking/holomotion/runner.py Sets MUJOCO_GL to glfw on macOS, egl elsewhere.
src/omg/render/mujoco.py Aligns default MUJOCO_GL selection with macOS vs non-macOS behavior.
src/omg/data/unified.py Improves label/text resolution with relative-path indexing; flushes cache build log.
src/omg/data/materialized.py Adds iter_stats_batches() to support exact scalable stats on materialized shards.
src/omg/data/lerobot_schema.py Introduces LeRobot v3 schema/constants and feature definitions.
src/omg/data/lerobot_inspect.py Adds LeRobot export inspection/validation helper.
src/omg/data/lerobot_export.py Implements LeRobot v3 export writer + pipeline to export unified sources.
src/omg/data/lerobot_dataset.py Adds LeRobot v3 dataset adapter for OMG training, including exact stats iterators.
src/omg/data/episode_cache.py Adds episode-cache dataset reading exact windows from cached frame-level tensors.
src/omg/data/episode_cache_inspect.py Adds episode-cache integrity inspector.
src/omg/data/datamodule.py Updates distributed sampler to interleave shard blocks for better batch mixing/caching.
src/omg/data/init.py Exposes LeRobotG1MotionDataset via package lazy import.
src/omg/cli/generation/train.py Makes callbacks logger-aware via requires_logger gating.
src/omg/cli/generation/compute_stats.py Switches to exact batch-based stats, float64 moments, and distributed aggregation.
src/omg/cli/data/validate_episode_cache.py Adds CLI to validate episode-cache structure and manifests.
src/omg/cli/data/materialize.py Updates defaults/naming and supports LeRobot dataset target in materialization config resolution.
src/omg/cli/data/materialize_episode_cache.py Adds episode-cache materialization CLI with resumable atomic writing.
src/omg/cli/data/inspect_lerobot.py Adds CLI wrapper for LeRobot export inspection.
src/omg/cli/data/export_lerobot.py Adds CLI wrapper for exporting LeRobot v3 datasets.
src/omg/cli/data/build_lerobot_config.py Adds CLI to generate export configs from a unified source root.
src/omg/callbacks/divergence_guard.py Adds configurable loss_monitor for divergence guard error detection/messages.
scripts/validate_lerobot_official.py Adds script to validate exports using the official lerobot loader.
scripts/materialize_omg_data.sh Updates materialization script to build the episode-cache artifact by default.
README.md Updates release links, materialization/stats instructions, and defaults to LeRobot/episode-cache flow.
pyproject.toml Adds [data] extra and includes LeRobot-related dependencies in all.
Makefile Updates default data config selection to omg_data_lerobot.
docs/training.md Updates example commands to use materialized data config.
docs/installation.md Documents installing the new [data] extra.
docs/data.md Rewrites data docs around LeRobot v3 source + episode-cache materialization + export tooling.
docs/artifacts.md Updates artifact links and directory layout to LeRobot v3 format.
configs/generation/train.yaml Switches default training config to omg_data_lerobot.
configs/generation/exp/100m.yaml Bounds val batches and configures divergence guard to monitor diffusion_loss.
configs/generation/data/omg_data_materialized.yaml Switches materialized config to EpisodeCachedG1MotionDataset.
configs/generation/data/omg_data_lerobot.yaml Adds LeRobot v3 source-data config.
configs/generation/callbacks/default.yaml Adds requires_logger and loss_monitor fields to callback configs.
assets/stats/g1_125d_stats.json Adds verified 125D normalization stats artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +270 to +278
mean = self.total / float(self.count)
variance = self.total_sq / float(self.count) - np.square(mean)
return {
"count": [self.count],
"mean": mean.astype(float).tolist(),
"std": np.sqrt(np.maximum(variance, 0.0)).astype(float).tolist(),
"min": self.minimum.astype(float).tolist(),
"max": self.maximum.astype(float).tolist(),
}
Comment on lines +157 to +160
def _load_episodes(self, info: dict[str, Any]) -> list[dict[str, Any]]:
frame = self.episode_dataset.to_pandas()
if "omg/split" in frame.columns:
frame = frame.loc[frame["omg/split"] == self.split]
Comment on lines +57 to +63
episode_files = sorted((root / "meta" / "episodes").rglob("*.parquet"))
if not episode_files:
raise FileNotFoundError(f"No episode parquet files found under {root / 'meta' / 'episodes'}")
rows: list[dict[str, Any]] = []
for path in episode_files:
rows.extend(pq.read_table(path).to_pylist())
data = _data_file_stats(root)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants