Open cadedaniel opened 1 year ago
Yeah, exposing actor_handle.actor_id()
seems like a no-brainer here. I think it should actually be actor_handle.get_actor_id()
and return a string to be consistent with the APIs in https://docs.ray.io/en/master/ray-core/api/doc/ray.runtime_context.RuntimeContext.html
Any thoughts @ericl or @scv119 ?
Wouldn't this conflict with a method called 'get_actor_id' on the actual actor?
Great point! So maybe be consistent with the other "hidden" methods then, call it actor_handle.__ray_actor_id__()
then and still make it public? Or keep it like it is and make it public?
__ray_terminate__
launches a remote method, so we should probably make this syntactically different. I'd vote to make the current thing public.
I'd vote to make the current thing public.
vote +1
Alright, sounds good to me! This has the advantage that it doesn't need migrations. We can just say in the docs even though this starts with an underscore to not clash with actor methods, this is a public interface
or something like that :)
I think the main action item of this issue will be to add ActorHandle
to https://docs.ray.io/en/latest/ray-core/package-ref.html and make sure this is documented.
Would an alternative is to add an helper method ray.get_actor_id(actor_handle)
?
Hi, I'm a bot from the Ray team :)
To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.
If there is no further activity in the 14 days, the issue will be closed!
You can always ask for help on our discussion forum or Ray's public slack channel.
Hi again! The issue will be closed because there has been no more activity in the 14 days since the last message.
Please feel free to reopen or open a new issue if you'd still like it to be addressed.
Again, you can always ask for help on our discussion forum or Ray's public slack channel.
Thanks again for opening the issue!
can I take this up ?
We should promote
_actor_id
to public API and also make it a usable string, e.g.repr
does not add anything except the ID.Example use case is in combination with the State API: