ray: KeyError on returning an ActorHandle from an Actor method.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Mac OS X
- Ray installed from (source or binary): pip
- Ray version: 0.2.2
- Python version: 3.6
- Exact command to reproduce:
ray.get(actor1.get_actor2.remote())
Describe the problem
I get a KeyError when I try to return an ActorHandle from an ActorMethod. See the annotated logs below for details.
Source code / logs
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/Users/DevinPetersohn/anaconda/envs/python36/lib/python3.6/site-packages/ray/actor.py", line 653, in __del__
self._ray_actor_handle_id.id() == ray.worker.NIL_ACTOR_ID):
File "/Users/DevinPetersohn/anaconda/envs/python36/lib/python3.6/site-packages/ray/actor.py", line 639, in __getattribute__
return object.__getattribute__(self, attr)
AttributeError: 'ActorHandle' object has no attribute '_ray_actor_handle_id'
Is it possible that the dictionary serialization of the ActorHandle is causing this problem?
WARNING: Serializing objects of type <class 'ray.actor.ActorHandle'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING: Serializing objects of type <class 'ray.signature.FunctionSignature'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
I am able to print the actor handle out here, and as long as I don’t try to access anything inside the Actor, there is no problem with the rest of the code. When I do try to access something inside the actor, the code exits. No new errors are shown when it exits.
Actor(c9cdbeda27c4c646e398f4dfbc4f3bc2553032b2)
Traceback (most recent call last):
File "g_main.py", line 33, in <module>
print(ray.get(x.get_oid_dictionary.remote()))
File "/Users/DevinPetersohn/anaconda/envs/python36/lib/python3.6/site-packages/ray/actor.py", line 419, in remote
dependency=self.actor._ray_actor_cursor)
File "/Users/DevinPetersohn/anaconda/envs/python36/lib/python3.6/site-packages/ray/actor.py", line 594, in _actor_method_call
is_actor_checkpoint_method=is_actor_checkpoint_method)
File "/Users/DevinPetersohn/anaconda/envs/python36/lib/python3.6/site-packages/ray/worker.py", line 516, in submit_task
self.task_driver_id.id()][function_id.id()]
KeyError: b'\xfa\xb1\xdd3v\xbbz\xd4\xe1h\x0c\x1f\xe2O>\x07\xa1+,\xe1'
All of the logs above are repeated whether I try to access something inside the Actor or not.
Is this error due to problems rebuilding the ActorHandle?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
@chtlp Makes sense, I created an issue for named actors at #1424.
@stephanie-wang sounds good!