mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 15:56:55 +08:00
Multiagent experiment resume (#5102)
* Fixed problem with multiagent experiment resume * Applied format script * fix lint
This commit is contained in:
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):
|
||||
|
||||
Reference in New Issue
Block a user