Hi. In the main driver I create a named & detached actor called “main_hub”.
MainHub_actor.options(name="main_hub", lifetime="detached").remote()
I’m using a library that spawns worker processes. This library does not use Ray.
When the worker process initializes, I call ray.init(address="auto")
. The worker driver shows up in the Ray dashboard along side the main driver.
In the worker driver, I call ray.get_actor("main_hub")
. And get the error:
Failed to look up actor with name 'main_hub'. This could because 1. You are trying to look up a named actor you didn't create. 2. The named actor died. 3. You did not use a namespace matching the namespace of the actor.
When I print the output of ray.state.actors()
, I can see the main_hub actor in an ALIVE state.
{'ActorID': '3f8de098c7069844d9ba374201000000', 'ActorClassName': 'MainHub_actor', 'IsDetached': True, 'Name': 'main_hub', 'JobID': '01000000', 'Address': {'IPAddress': '192.168.0.157', 'Port': 41243, 'NodeID': '5e360bece9cecf8649d0eb29025419877bc187970e1c34e9281061e4'}, 'OwnerAddress': {'IPAddress': '192.168.0.157', 'Port': 41453, 'NodeID': '5e360bece9cecf8649d0eb29025419877bc187970e1c34e9281061e4'}, 'State': 'ALIVE', 'NumRestarts': 0, 'Timestamp': 1745770994897.0, 'StartTime': 1745770994897, 'EndTime': 0, 'DeathCause': , 'Pid': 495823}
What could be happening & what should I do next?