Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core][cgraph] Fix doc test cgraph_overlap #51139

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

ruisearch42
Copy link
Contributor

Why are these changes needed?

Explicitly tear down the compiled graph and kill the actors rather than relying on GC.

Also previously in Compiled Graph, actor is killed only when the actor task does not finish within timeout. This PR fixes it by always killing the actor when kill_actors=True.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
@ruisearch42 ruisearch42 requested a review from a team as a code owner March 6, 2025 21:36
@dayshah dayshah added the go add ONLY when ready to merge, run all tests label Mar 6, 2025
# Now, we force kill the actors if not yet.
for actor in outer.worker_task_refs:
logger.info(f"Killing actor: {actor}")
ray.kill(actor)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if they were already killed before, should we be double killing, should we check if they were killed before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no effect if the actor is already killed:

void GcsActorManager::KillActor(const ActorID &actor_id, bool force_kill) {

Also did a quick test, there is no issue with a double kill.

@aslonnie aslonnie merged commit d0e76d6 into ray-project:master Mar 7, 2025
4 of 5 checks passed
elimelt pushed a commit to elimelt/ray that referenced this pull request Mar 9, 2025
Explicitly tear down the compiled graph and kill the actors rather than relying on GC.

Also previously in Compiled Graph, actor is killed only when the actor task does not finish within timeout. This PR fixes it by always killing the actor when kill_actors=True.

Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants