Fix attribute error when missing exploration in Policy.
Issue #8191
This commit is contained in:
Sven Mika
2020-04-27 23:19:26 +02:00
committed by GitHub
parent 48250217ac
commit 4e713152e9
4 changed files with 19 additions and 15 deletions
+4 -2
View File
@@ -152,8 +152,10 @@ class MultiAgentSampleBatchBuilder:
post_batches[agent_id] = policy.postprocess_trajectory(
pre_batch, other_batches, episode)
# Call the Policy's Exploration's postprocess method.
policy.exploration.postprocess_trajectory(
policy, post_batches[agent_id], getattr(policy, "_sess", None))
if getattr(policy, "exploration", None) is not None:
policy.exploration.postprocess_trajectory(
policy, post_batches[agent_id],
getattr(policy, "_sess", None))
if log_once("after_post"):
logger.info(