mirror of
https://github.com/huggingface/lerobot.git
synced 2026-06-14 14:59:57 +00:00
test(groot): regression coverage and CI guards for the N1.7 review fixes
Adds/updates unit tests for the N1.5 removal surfaces (config, checkpoint markers, removed processor steps, v2 action-unpack registration), the legacy-default remap warnings, action_decode_transform auto/none resolution, 2-D action decoding, the per-instance raw-state cache and pack/decode reconnection, raw-checkpoint stats fallback and override handling, camera-match warnings, bf16 handling, and backbone loading kwargs. Adds pytest.importorskip guards so the fast_tests tiers pass without transformers, and asserts the training forward pass returns a finite loss. Note: these tests exercise symbols introduced by the GR00T N1.7 source PRs (source-core, backbone); merge those for green CI on this branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -207,6 +207,11 @@ def test_lerobot_groot_forward_pass():
|
||||
with torch.no_grad():
|
||||
lerobot_loss, lerobot_metrics = lerobot_policy.forward(batch_lerobot_processed)
|
||||
|
||||
assert isinstance(lerobot_loss, torch.Tensor)
|
||||
assert torch.isfinite(lerobot_loss).all()
|
||||
assert "loss" in lerobot_metrics
|
||||
assert np.isfinite(lerobot_metrics["loss"])
|
||||
|
||||
print("\nForward pass successful.")
|
||||
print(f" - Loss: {lerobot_loss.item():.6f}")
|
||||
print(f" - Metrics: {lerobot_metrics}")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user