An actor pool is a utility class similar to multiprocessing.Pool that lets you schedule Ray tasks over a fixed pool of actors.
References:
-
Create an Actor pool from a list of existing actors. An actor pool is a utility class similar to multiprocessing.Pool that lets you schedule Ray tasks over a fixed pool of actors. Arguments: actors (list): List of Ray actor handles to use in this pool. Examples: >>> a1, a2 = Actor.remote(), Actor.remote() >>> pool = ActorPool([a1, a2]) >>> print(pool.map(lambda a, v: a.double.remote(v), [1, 2, 3, 4])) [2, 4, 6, 8]