add flatten dict wrapper when observation space is dict (hack, don't merge)
This commit is contained in:
@@ -53,6 +53,8 @@ def make_env(env_id, env_type, subrank=0, seed=None, reward_scale=1.0, gamestate
|
||||
env = retro_wrappers.make_retro(game=env_id, max_episode_steps=10000, use_restricted_actions=retro.Actions.DISCRETE, state=gamestate)
|
||||
else:
|
||||
env = gym.make(env_id)
|
||||
if isinstance(env.observation_space, gym.spaces.Dict):
|
||||
env = gym.wrappers.FlattenDictWrapper(env, dict_keys=['observation', 'desired_goal'])
|
||||
|
||||
env.seed(seed + subrank if seed is not None else None)
|
||||
env = Monitor(env,
|
||||
|
Reference in New Issue
Block a user