-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Currently, MeltingPotCompatibilityV0 works only when the input env is a substrate, rather than a scenario. This is because self._env.observation_spec()[0] has no attribute "WORLD.RGB". This can be rectified by replacing lines 90-92 of meltingpot_compability.py with
if type(self._env) is meltingpot.utils.scenarios.scenario.Scenario:
_env = self._env._substrate
else:
_env = self._env
self.state_space = utils.dm_spec2gym_space(
_env.observation_spec()[0]["WORLD.RGB"]
)
and lines 129-131 with
if type(self._env) is meltingpot.utils.scenarios.scenario.Scenario:
_env = self._env._substrate
else:
_env = self._env
observation_space = utils.remove_world_observations_from_space(
utils.dm_spec2gym_space(_env.observation_spec()[0]) # type: ignore
However, the code still runs into a pickling error later down the line. What would be the best way to fix this and add the feature?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels