Simplified metaworld adapter

This commit is contained in:
Dominik Moritz Roth 2023-08-21 11:58:29 +02:00
parent 94c4397fac
commit 6d80201a03

View File

@ -65,17 +65,17 @@ def make_metaworld(underlying_id: str, seed: int = 1, render_mode: Optional[str]
# TODO remove this as soon as there is support for the new API # TODO remove this as soon as there is support for the new API
_env = EnvCompatibility(_env, render_mode) _env = EnvCompatibility(_env, render_mode)
env = _env
gym_id = '_metaworld_compat_' + uuid.uuid4().hex + '-v0' # gym_id = '_metaworld_compat_' + uuid.uuid4().hex + '-v0'
# gym_register(
gym_register( # id=gym_id,
id=gym_id, # entry_point=lambda: _env,
entry_point=lambda: _env, # max_episode_steps=max_episode_steps,
max_episode_steps=max_episode_steps, # )
)
# TODO enable checker when the incorrect dtype of obs and observation space are fixed by metaworld # TODO enable checker when the incorrect dtype of obs and observation space are fixed by metaworld
env = gym.make(gym_id, disable_env_checker=True) # env = gym.make(gym_id, disable_env_checker=True)
env = MujocoMapSpacesWrapper(env) env = MujocoMapSpacesWrapper(env)
# TODO remove, when this has been fixed upstream # TODO remove, when this has been fixed upstream
env = MitigateMetaworldBug(env) env = MitigateMetaworldBug(env)