ray.rllib.evaluation.rollout_worker.RolloutWorker.foreach_env#

RolloutWorker.foreach_env(func: Callable[[Any], ray.rllib.utils.typing.T]) List[ray.rllib.utils.typing.T][source]#

Calls the given function with each sub-environment as arg.

Parameters

func – The function to call for each underlying sub-environment (as only arg).

Returns

The list of return values of all calls to func([env]).