Repository navigation
fix(envs): use RoboCasa task horizons - #4037
Merged
Merged
Conversation
anasm266
marked this pull request as ready for review
July 16, 2026 03:20
Contributor
There was a problem hiding this comment.
Pull request overview
Uses RoboCasa鈥檚 task-specific rollout horizons by default while retaining explicit global overrides.
Changes:
- Resolves registered horizons lazily per task.
- Updates configuration defaults and documentation.
- Adds regression tests for per-task defaults and overrides.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/lerobot/envs/robocasa.py |
Resolves and applies task horizons. |
src/lerobot/envs/configs.py |
Makes episode length optional by default. |
tests/envs/test_robocasa.py |
Tests defaults, multi-task horizons, and overrides. |
docs/source/robocasa.mdx |
Documents default and override behavior. |
馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
wddler
pushed a commit
to wddler/lerobot
that referenced
this pull request
Aug 4, 2026
Co-authored-by: Pepijn <138571049+pkooij@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / Motivation
RoboCasa registers different rollout horizons for each task, but LeRobot currently assigns every task a default episode length of 1000. This PR uses each task's registered horizon when
--env.episode_lengthis omitted, while preserving an explicit episode length as a global override.Related issues
What changed
RoboCasaEnv.episode_lengthtoNone.get_task_horizon._max_episode_stepsfrom the task registry.Explicit
--env.episode_lengthusage remains compatible. Only the default behavior changes.How was this tested (or how to run locally)
Validated with Python 3.12 in a local Ubuntu Docker environment:
tests/envs/test_robocasa.py: 3 passedtests/envssuite: 40 passed, 11 skippedpre-commit run --all-files: passedgit diff --check: passedA real RoboCasa GPU rollout was not run locally. The repository's RoboCasa benchmark workflow is triggered by changes under
src/lerobot/envs/**.Checklist (required before merge)
pre-commit run -a)pytest)Reviewer notes
The RoboCasa import remains lazy so the optional dependency is not required at module import time. The evaluator is unchanged because it already respects each wrapper's
_max_episode_steps.