Give an actor a name so other tasks can fetch a handle to it from anywhere in the cluster.
counter = Counter.options(name="global_counter", lifetime="detached").remote()# elsewhere — even in a different jobcounter = ray.get_actor("global_counter")
lifetime="detached" keeps the actor alive after the creating job exits.
Actors are heavyweight compared to tasks. Use them when you need state — model weights, caches, accumulators — and use tasks when you don’t.
Avoid making actor methods CPU-bound and long-running. A long call blocks all other calls to that actor. Split work into smaller methods or use multiple actors.