[rllib] Add more warnings when multi-agent envs might not be set up right (#3061)

This commit is contained in:
Eric Liang
2018-10-15 13:42:56 -07:00
committed by GitHub
parent 3c891c6ece
commit 6240ccbc6e
4 changed files with 24 additions and 2 deletions
@@ -155,6 +155,11 @@ def _resolve_lambda_vars(spec, lambda_vars):
value = fn(_UnresolvedAccessGuard(spec))
except RecursiveDependencyError as e:
error = e
except Exception:
raise ValueError(
"Failed to evaluate expression: {}: {}".format(path, fn) +
". If you meant to pass this as a function literal, use "
"tune.function() to escape it.")
else:
_assign_value(spec, path, value)
resolved[path] = value