- WorkerSet.foreach_worker_async(func: Callable[[EnvRunner], T], *, healthy_only: bool = False, remote_worker_ids: List[int] = None) int #
Calls the given function asynchronously with each worker as the argument.
foreach_worker_async() does not return results directly. Instead, fetch_ready_async_reqs() can be used to pull results in an async manner whenever they are available.
func – The function to call for each worker (as only arg).
healthy_only – Apply
funcon known-to-be healthy workers only.
remote_worker_ids – Apply
funcon a selected set of remote workers.
The number of async requests that are currently in-flight.