Skip to content

Conversation

@dayshah
Copy link
Contributor

@dayshah dayshah commented Oct 20, 2025

Description

Ray Data doesn't want this warning log to show on all workloads. Now, they pass a detached ActorLocationTracker into actors with max_restarts > 0. A detached actor won't go out of scope, so as long as it isn't ray.killed it'll still exist when the actor with it as an arg needs to restart. See - #57838 - minimal ray data usage will result in the log now.

We'll revert this logic back once #53727 is fixed.

Here I'm just checking if an inlined arg passed by ref is a detached actor. If it is, we'll skip setting the warning flag so we won't log the warning. The actor handle has no way of knowing whether the actor is detached so I had to create that path.

Used this script to test that we don't log the warning.

@ray.remote(max_restarts=-1)
class Actor:
    def __init__(self, other_actor_ref):
        self.other_actor_ref = other_actor_ref

    def do_thing(self):
        print("hi")

detached_actor = Actor.options(name="detached_actor").remote(None)
actor = Actor.remote(detached_actor)

ray.get(actor.do_thing.remote())

Note: There's one gotcha here - is_detached doesn't get through all the way if you're passing the actor handle around because the serialization doesn't take it into account, I'll fix this in a follow up right after

Signed-off-by: dayshah <dhyey2019@gmail.com>
@dayshah dayshah added the go add ONLY when ready to merge, run all tests label Oct 20, 2025
Signed-off-by: dayshah <dhyey2019@gmail.com>
@dayshah dayshah marked this pull request as ready for review October 20, 2025 23:44
@dayshah dayshah requested a review from a team as a code owner October 20, 2025 23:44
Signed-off-by: dayshah <dhyey2019@gmail.com>
@ray-gardener ray-gardener bot added the core Issues that should be addressed in Ray Core label Oct 21, 2025
@dayshah dayshah enabled auto-merge (squash) October 21, 2025 01:55
@dayshah dayshah merged commit d86484d into ray-project:master Oct 21, 2025
6 checks passed
@dayshah dayshah deleted the dont-log-detached branch October 21, 2025 02:27
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Oct 22, 2025
…project#57931)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: xgui <xgui@anyscale.com>
elliot-barn pushed a commit that referenced this pull request Oct 23, 2025
Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…project#57931)

Signed-off-by: dayshah <dhyey2019@gmail.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants