Obtain actor-handle from within an actor to self

You could actually do so by (in your actor method)


ctx = ray.get_runtime_context()
actor_handle = ctx.current_actor()

https://docs.ray.io/en/latest/ray-core/api/doc/ray.runtime_context.RuntimeContext.html?highlight=current_actor
and ray.runtime_context.get_runtime_context — Ray 2.3.1

1 Like