araffin / rl-baselines-zoo

A collection of 100+ pre-trained RL agents using Stable Baselines, training and hyperparameter optimization included.
https://stable-baselines.readthedocs.io/
MIT License
1.12k stars 206 forks source link

Wrapping eval_env with HERGoalEnvWrapper when necessary #84

Closed PierreExeter closed 4 years ago

PierreExeter commented 4 years ago

This PR gets rid of the warning when using HER, see issue #77.

UserWarning: Training and eval env are not of the same type<stable_baselines.her.utils.HERGoalEnvWrapper object at 0x7f68828e7be0> != <stable_baselines.common.vec_env.dummy_vec_env.DummyVecEnv object at 0x7f686266ea58>
  "{} != {}".format(self.training_env, self.eval_env))

Steps to reproduce:

python train.py --algo her --env parking-v0 -n 10000

A PR for Stable Baselines will be submitted as it is now necessary to flatten observations in HERGoalEnvWrapper

araffin commented 4 years ago

I will close this one in favor of #85 (your commits are included there)