Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Make TransformedEnv mirror allow_done_after_reset property of base env #1810

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Amend
  • Loading branch information
matteobettini committed Jan 17, 2024
commit 2985e3a829044a98286e8d3c4d0ac0e36d18ab6f
4 changes: 3 additions & 1 deletion torchrl/envs/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,9 @@ def __init__(
env = env.to(device)
else:
device = env.device
super().__init__(device=None, **kwargs)
super().__init__(
device=None, allow_done_after_reset=env._allow_done_after_reset, **kwargs
)

if isinstance(env, TransformedEnv):
self._set_env(env.base_env, device)
Expand Down