Commit f27deeb8 authored by pfrl_rainbow's avatar pfrl_rainbow
Browse files

Don't use ContinuousTimeLimit in testing

parent 5e18f521
......@@ -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