Closed neonine2 closed 3 years ago
get_original_obs
is a function of VecNormalize, so it returns whatever is stored in its buffers. env.reset
goes through VecNormalize, where it updates those buffers. env_method
, on the other hand, is a function of VecEnv, so calling it does not update VecNormalize's buffers. I recommend you create a new function for your env, e.g. set_reset_params
, which you use to set the reset parameters for envs for the next reset
call.
PS: I also recommend migrating to stable-baselines3 as it is more actively supported.
Great! thank you very much, and I'll look into baselines3.
My environment is wrapped as such:
Everytime I reset it using the standard
reset()
method, the observation changes (as expected since my reset includes a randomization)Since I want to pass a parameter to
reset()
, I tried to test out the following, expecting the same behavior as aboveHowever, as I excute this code over and over,
obs
doesn't change at all, it's clear thatenv
isn't actually being resetted, even though executingenv.env_method('reset')
does output different value each time.Does running
env.env_method('reset')
not reset the environment in the same way asenv.reset()
?