diff --git a/src/lerobot/configs/recipe.py b/src/lerobot/configs/recipe.py index 4ce2ca3dd..43d90c1ce 100644 --- a/src/lerobot/configs/recipe.py +++ b/src/lerobot/configs/recipe.py @@ -104,7 +104,6 @@ class TrainingRecipe: messages: list[MessageTurn] | None = None bindings: dict[str, str] | None = None - requires: list[str] | None = None blend: dict[str, TrainingRecipe] | None = None weight: float | None = None @@ -152,9 +151,6 @@ class TrainingRecipe: assert self.messages is not None known_bindings = set(DEFAULT_BINDINGS) | set(self.bindings or {}) | {"task"} - missing_requirements = set(self.requires or ()) - known_bindings - if missing_requirements: - raise ValueError(f"TrainingRecipe requires unknown binding(s): {sorted(missing_requirements)}") for turn in self.messages: missing = self._referenced_bindings(turn) - known_bindings if missing: @@ -172,8 +168,6 @@ class TrainingRecipe: def _validate_blend_recipe(self) -> None: """Ensure each blend component is a non-empty, weighted message recipe.""" assert self.blend is not None - if self.requires: - raise ValueError("A blend recipe cannot declare requires; set it on its components.") if not self.blend: raise ValueError("Blend recipes must contain at least one component.") diff --git a/src/lerobot/datasets/language_render.py b/src/lerobot/datasets/language_render.py index 0680733ca..624f19e9b 100644 --- a/src/lerobot/datasets/language_render.py +++ b/src/lerobot/datasets/language_render.py @@ -385,8 +385,6 @@ def _render_message_recipe( ) -> RenderedMessages | None: """Expand ``recipe.messages`` into rendered chat messages using ``bindings``.""" assert recipe.messages is not None - if any(bindings.get(name) is None for name in recipe.requires or ()): - return None messages: list[dict[str, Any]] = [] streams: list[str | None] = [] target_indices: list[int] = [] diff --git a/tests/configs/test_recipe.py b/tests/configs/test_recipe.py index 5174198df..7e9484628 100644 --- a/tests/configs/test_recipe.py +++ b/tests/configs/test_recipe.py @@ -57,14 +57,6 @@ def test_message_recipe_requires_at_least_one_target(): ) -def test_message_recipe_requires_known_bindings(): - with pytest.raises(ValueError, match="requires unknown binding"): - TrainingRecipe( - messages=[_minimal_target_turn()], - requires=["not_a_binding"], - ) - - def test_recipe_rejects_both_messages_and_blend(): with pytest.raises(ValueError, match="only one"): TrainingRecipe(