From 27bbb6b4d99b62aac5f907e6129801943ee23466 Mon Sep 17 00:00:00 2001 From: Pepijn Kooijmans Date: Tue, 7 Apr 2026 11:25:49 +0200 Subject: [PATCH] refactor: revert policy changes, keep env-only camera mapping fixes - Revert GR00T N1.5 default_factory/default changes (transformers compat) - Revert SmolVLA use_peft legacy field - Apply ruff formatting fixes - camera_name_mapping stays entirely in env/eval layer (no policy changes) Made-with: Cursor --- src/lerobot/envs/configs.py | 1 + src/lerobot/policies/groot/groot_n1.py | 8 ++++---- src/lerobot/policies/smolvla/configuration_smolvla.py | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lerobot/envs/configs.py b/src/lerobot/envs/configs.py index 1bea2d129..750187c05 100644 --- a/src/lerobot/envs/configs.py +++ b/src/lerobot/envs/configs.py @@ -103,6 +103,7 @@ class EnvConfig(draccus.ChoiceRegistry, abc.ABC): try: from gymnasium.vector import AutoresetMode + vec = env_cls([_make_one for _ in range(n_envs)], autoreset_mode=AutoresetMode.SAME_STEP) except ImportError: vec = env_cls([_make_one for _ in range(n_envs)]) diff --git a/src/lerobot/policies/groot/groot_n1.py b/src/lerobot/policies/groot/groot_n1.py index 0b5114893..06ff5a04d 100644 --- a/src/lerobot/policies/groot/groot_n1.py +++ b/src/lerobot/policies/groot/groot_n1.py @@ -176,13 +176,13 @@ N_COLOR_CHANNELS = 3 @dataclass class GR00TN15Config(PretrainedConfig): model_type = "gr00t_n1_5" - backbone_cfg: dict = field(init=False, default_factory=dict, metadata={"help": "Backbone configuration."}) + backbone_cfg: dict = field(init=False, metadata={"help": "Backbone configuration."}) - action_head_cfg: dict = field(init=False, default_factory=dict, metadata={"help": "Action head configuration."}) + action_head_cfg: dict = field(init=False, metadata={"help": "Action head configuration."}) - action_horizon: int = field(init=False, default=0, metadata={"help": "Action horizon."}) + action_horizon: int = field(init=False, metadata={"help": "Action horizon."}) - action_dim: int = field(init=False, default=0, metadata={"help": "Action dimension."}) + action_dim: int = field(init=False, metadata={"help": "Action dimension."}) compute_dtype: str = field(default="float32", metadata={"help": "Compute dtype."}) def __init__(self, **kwargs): diff --git a/src/lerobot/policies/smolvla/configuration_smolvla.py b/src/lerobot/policies/smolvla/configuration_smolvla.py index c827994cc..5007abbb4 100644 --- a/src/lerobot/policies/smolvla/configuration_smolvla.py +++ b/src/lerobot/policies/smolvla/configuration_smolvla.py @@ -109,7 +109,6 @@ class SmolVLAConfig(PreTrainedConfig): compile_model: bool = False # Whether to use torch.compile for model optimization compile_mode: str = "max-autotune" # Torch compile mode - def __post_init__(self): super().__post_init__()