ray.rllib.policy.torch_policy_v2.TorchPolicyV2.get_tower_stats#

TorchPolicyV2.get_tower_stats(stats_name: str) List[Union[numpy.array, jnp.ndarray, tf.Tensor, torch.Tensor, dict, tuple]][source]#

Returns list of per-tower stats, copied to this Policy’s device.

Parameters

stats_name – The name of the stats to average over (this str must exist as a key inside each tower’s tower_stats dict).

Returns

The list of stats tensor (structs) of all towers, copied to this Policy’s device.

Raises
  • AssertionError – If the stats_name cannot be found in any one

  • of the tower's tower_stats dicts.