How severe does this issue affect your experience of using Ray?
- High: It blocks me to complete my task.
The error “ValueError: Obs space must be a Tuple, got Tuple(Box(0.0, 1.0, (28,), float32), Box(0.0, 1.0, (28,), float32), Box(0.0, 1.0, (28,), float32), Box(0.0, 1.0, (28,), float32)). Use MultiAgentEnv.with_agent_groups() to group related agents for QMix.” is misleading.
I noticed in qmix_policy.py, def _validate(obs_space, action_space):
the obs_space has no attr “original_space”
In the enviroment creator I defined
obs_space = gym.spaces.Tuple([gym.spaces.Box(low=0, high=1, shape=(len(features),)) for _ in agents])
act_space = gym.spaces.Tuple([gym.spaces.Box(low=0, high=1, shape=(1,)) for _ in agents])
return MyEnv(env_config=env_cfg).with_agent_groups(
groups={"agents": agents},
obs_space=obs_space,
act_space=act_space,
)
and in the environment
self.observation_space = gym.spaces.Dict({
x : gym.spaces.Box(low=0, high=1, shape=(len(features),)) for x in self.agents
})
self.action_space = gym.spaces.Dict({
x : gym.spaces.Box(low=0, high=1, shape=(1,)) for x in self.agents
})