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

RolloutWorker.foreach_env(func: Callable[[Any | gymnasium.Env], T]) List[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]).