diff --git a/src/lerobot/policies/groot/configuration_groot.py b/src/lerobot/policies/groot/configuration_groot.py index c64c6143f..bf9e96321 100644 --- a/src/lerobot/policies/groot/configuration_groot.py +++ b/src/lerobot/policies/groot/configuration_groot.py @@ -327,7 +327,7 @@ class GrootConfig(PreTrainedConfig): # Enable GR00T-style state-relative action chunks (action chunk expressed relative to the current # observation state). use_relative_actions: bool = False - + # relative_exclude_joints names the action dimensions that stay absolute; the # match is substring/case-insensitive against the dataset action feature names. With the empty # default every dimension is treated as relative, including the gripper -- set e.g. ["gripper"] to diff --git a/src/lerobot/policies/groot/processor_groot.py b/src/lerobot/policies/groot/processor_groot.py index 63b0166e5..4859d0946 100644 --- a/src/lerobot/policies/groot/processor_groot.py +++ b/src/lerobot/policies/groot/processor_groot.py @@ -1671,7 +1671,7 @@ class GrootN17PackInputsStep(ProcessorStep): Relative groups normalize with per-chunk-timestep (2D) ``relative_action`` stats, which the flat ``_min_max_norm`` fallback cannot honor, so a relative config that fails grouped - normalization must fail loudly rather than silently mis-scale every timestep. + normalization must fail loudly rather than silently wrongly scale every timestep. """ if not isinstance(self.modality_config, dict): return False @@ -1808,7 +1808,7 @@ class GrootN17PackInputsStep(ProcessorStep): "relative-action chunk: the action layout or horizon does not match the " f"checkpoint relative_action stats (action shape {tuple(action.shape)}). The flat " "min/max fallback cannot honor per-chunk-timestep relative stats, so refusing to " - "silently mis-normalize. Recompute the relative action stats so their horizon and " + "silently wrongly normalize. Recompute the relative action stats so their horizon and " "dimensions match the action chunk." ) else: diff --git a/tests/policies/groot/test_groot_n1_7.py b/tests/policies/groot/test_groot_n1_7.py index d8f8cfbc6..9e300441e 100644 --- a/tests/policies/groot/test_groot_n1_7.py +++ b/tests/policies/groot/test_groot_n1_7.py @@ -1013,7 +1013,7 @@ def test_groot_n1_7_pack_inputs_normalizes_action_chunk_per_dimension_before_pad def test_groot_n1_7_pack_inputs_raises_when_relative_groups_cannot_normalize(): # Relative groups carry per-chunk-timestep stats; if the action horizon exceeds the available - # stat rows, grouped normalization cannot apply and the flat fallback would silently mis-scale. + # stat rows, grouped normalization cannot apply and the flat fallback would silently wrongly scale. step = GrootN17PackInputsStep( action_horizon=3, valid_action_horizon=3, diff --git a/tests/policies/groot/utils/dump_original_n1_7.py b/tests/policies/groot/utils/dump_original_n1_7.py index 26d1cd10c..773f8dfad 100644 --- a/tests/policies/groot/utils/dump_original_n1_7.py +++ b/tests/policies/groot/utils/dump_original_n1_7.py @@ -62,10 +62,7 @@ def make_observation(seed: int, video_keys, lang_key, state_spec): # One ndarray per state key, shape (B, T=1, key_dim); dim taken from statistics. # Keys with dim 0 (e.g. disabled eef on some embodiments) are still emitted as # present-but-empty so the processor's state transform finds every expected key. - state = { - k: rng.standard_normal((BATCH_SIZE, 1, dim)).astype(np.float32) - for k, dim in state_spec - } + state = {k: rng.standard_normal((BATCH_SIZE, 1, dim)).astype(np.float32) for k, dim in state_spec} language = {lang_key: [[PROMPT] for _ in range(BATCH_SIZE)]} return {"video": video, "state": state, "language": language} @@ -181,7 +178,12 @@ def main(): state_spec = [(k, len(v["min"])) for k, v in stats[tag]["state"].items()] try: dump_one_tag( - policy, fair_model, tag, all_modality[tag], state_spec, args, + policy, + fair_model, + tag, + all_modality[tag], + state_spec, + args, out_dir / f"original_n1_7_{tag}.npz", ) done.append(tag)