mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
[RLlib] Fix for issue https://github.com/ray-project/ray/issues/8191 (#8200)
Fix attribute error when missing exploration in Policy. Issue #8191
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user