Skip to content

--max-episode-steps did nothing - #3

Merged
tactino merged 1 commit into
mainfrom
fix/runtime-max-episode-steps
Sep 11, 2026
Merged

tactino merged 1 commit into
mainfrom
fix/runtime-max-episode-steps

Conversation

@tactino

@tactino tactino commented Sep 11, 2026

Copy link
Copy Markdown
Member

make() applied a TimeLimitWrapper using only
env_spec.max_episode_steps - the value fixed at registration. A
max_episode_steps passed at make time was stashed onto the config a few
lines below and never read back, so the registered default won and the CLI
flag silently had no effect.

Measured before, with Dummy-v1 whose registered default is 200000:

gym.make_vec(..., max_episode_steps=3)
step 1..6: truncated=False

after:

step 3: truncated=True

The fix and its test are nothingbutbut's, from the unmerged
features/robocasa branch; the test runs unchanged on main.

🤖 Generated with Claude Code

make() applied a TimeLimitWrapper using only env_spec.max_episode_steps, the
value fixed at registration. A max_episode_steps passed at make time was
stashed onto the config a few lines below and then never read back, so the
registered default won and the CLI flag silently had no effect.

Measured before the fix, with Dummy-v1 whose registered default is 200000:

    gym.make_vec(..., max_episode_steps=3)
    step 1..6: truncated=False

and after:

    step 3: truncated=True

The fix and its test are nothingbutbut's, from the unmerged
features/robocasa branch. The test runs unchanged on main.

Co-Authored-By: nothingbutbut <2367347983@qq.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tactino
tactino merged commit a3ba0a7 into main Sep 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant