- WorkerSet.foreach_env_with_context(func: Callable[[BaseEnv, EnvContext], List[T]]) List[List[T]] #
funcwith all workers’ sub-environments and env_ctx as args.
An “underlying sub environment” is a single clone of an env within a vectorized environment.
functakes a single underlying sub environment and the env_context as args.
func – A function - taking a BaseEnv object and an EnvContext as arg - and returning a list of lists of return values over envs of the worker.
- The list (1 item per workers) of lists (1 item per sub-environment)