mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
[RLlib] Issue 8714: QMIX init error w/ tuple obs space. (#8936)
This commit is contained in:
@@ -194,6 +194,7 @@ class QMixTorchPolicy(Policy):
|
||||
agent_obs_space = agent_obs_space.spaces["obs"]
|
||||
else:
|
||||
self.obs_size = _get_size(agent_obs_space)
|
||||
self.env_global_state_shape = (self.obs_size, self.n_agents)
|
||||
|
||||
self.model = ModelCatalog.get_model_v2(
|
||||
agent_obs_space,
|
||||
|
||||
@@ -78,6 +78,8 @@ class TestAvailActionsQMix(unittest.TestCase):
|
||||
for _ in range(5):
|
||||
agent.train() # OK if it doesn't trip the action assertion error
|
||||
assert agent.train()["episode_reward_mean"] == 21.0
|
||||
agent.stop()
|
||||
ray.shutdown()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user