Commit 32342ba6 authored by avinash_ummadisingu's avatar avinash_ummadisingu
Browse files

Fix unexpected behavior of env_wrapper

parent ab9359cb
......@@ -22,7 +22,9 @@ def wrap_env(
randomize_action, eval_epsilon,
# wrap env: time limit...
if isinstance(env, gym.wrappers.TimeLimit):
# Don't use `ContinuingTimeLimit` for testing, in order to avoid unexpected behavior on submissions.
# (Submission utility regards "done" as an episode end, which will result in endless evaluation)
if not test and isinstance(env, gym.wrappers.TimeLimit):'Detected `gym.wrappers.TimeLimit`! Unwrap it and re-wrap our own time limit.')
env = env.env
max_episode_steps = env.spec.max_episode_steps
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment