- WorkerSet.foreach_env(func: Callable[[Any], List[ray.rllib.evaluation.worker_set.T]]) List[List[ray.rllib.evaluation.worker_set.T]] [source]#
funcwith all workers’ sub-environments as args.
An “underlying sub environment” is a single clone of an env within a vectorized environment.
functakes a single underlying sub environment as arg, e.g. a gym.Env object.
func – A function - taking an EnvType (normally a gym.Env object) as arg and returning a list of lists of return values, one value per underlying sub-environment per each worker.
The list (workers) of lists (sub environments) of results.