Skip to content

Commit ebbebea

Browse files
committed
Explicitly set AutoResetWrapper flag due to upstream change in default
1 parent cec62a0 commit ebbebea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/reward_preprocessing/procgen.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def make_auto_reset_procgen(procgen_env_id: str, **make_env_kwargs) -> gym.Env:
1717
"""Make procgen with auto reset. Final observation is not fixed.
1818
1919
That means the final observation will be a duplicate of the second to last."""
20-
env = AutoResetWrapper(gym.make(procgen_env_id, **make_env_kwargs))
20+
env = AutoResetWrapper(
21+
gym.make(procgen_env_id, **make_env_kwargs), discard_terminal_observation=False
22+
)
2123
return env
2224

2325

@@ -28,7 +30,10 @@ def make_fin_obs_auto_reset_procgen(procgen_env_id: str, **make_env_kwargs) -> g
2830
# done signal, on order to fix the final observation of an episode. The auto reset
2931
# wrapper will reset the done signal to False for the original episode end.
3032
env = AutoResetWrapper(
31-
ProcgenFinalObsWrapper(gym.make(procgen_env_id, **make_env_kwargs))
33+
ProcgenFinalObsWrapper(
34+
gym.make(procgen_env_id, **make_env_kwargs),
35+
),
36+
discard_terminal_observation=False,
3237
)
3338
return env
3439

0 commit comments

Comments
 (0)