Multiagent experiment resume (#5102)

* Fixed problem with multiagent experiment resume

* Applied format script

* fix lint
This commit is contained in:
Aleksei Petrenko
2019-07-06 11:38:17 -07:00
committed by Eric Liang
parent e9b88dcbed
commit 09bde397c9
@@ -750,10 +750,11 @@ def _validate_multiagent_config(policy, allow_none_graph=False):
if not isinstance(k, str):
raise ValueError("policy keys must be strs, got {}".format(
type(k)))
if not isinstance(v, tuple) or len(v) != 4:
if not isinstance(v, (tuple, list)) or len(v) != 4:
raise ValueError(
"policy values must be tuples of "
"(cls, obs_space, action_space, config), got {}".format(v))
"policy values must be tuples/lists of "
"(cls or None, obs_space, action_space, config), got {}".
format(v))
if allow_none_graph and v[0] is None:
pass
elif not issubclass(v[0], Policy):