fix(style): pre-commit

This commit is contained in:
Steven Palma
2026-06-30 14:33:38 +02:00
committed by Andy Wrenn
parent 44b6950f06
commit b422269de4
3 changed files with 10 additions and 8 deletions
@@ -1670,7 +1670,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
@@ -1807,7 +1807,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:
+1 -1
View File
@@ -1022,7 +1022,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,
@@ -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)