Skip to content

[Data][LLM] Remove DataContext overrides in Ray Data LLM Processor#60142

Merged
kouroshHakha merged 4 commits intoray-project:masterfrom
nrghosh:nrghosh/ray-data-llm-actor-pool-cleanup
Jan 14, 2026
Merged

[Data][LLM] Remove DataContext overrides in Ray Data LLM Processor#60142
kouroshHakha merged 4 commits intoray-project:masterfrom
nrghosh:nrghosh/ray-data-llm-actor-pool-cleanup

Conversation

@nrghosh
Copy link
Contributor

@nrghosh nrghosh commented Jan 14, 2026

Summary

Remove two DataContext workarounds in Ray Data LLM that are no longer needed:

  1. Remove wait_for_min_actors_s = 600 override (issue [Data] GPU resource leakage after ray.data.llm pipeline is terminated #53124 closed)
  2. Remove _enable_actor_pool_on_exit_hook = True override (issue [Core] Make sure Actor's __del__ method invoked on Actor's destruction #53169 closed)

Behavior Change

Previously, Ray Data LLM hardcoded wait_for_min_actors_s = 600, which caused blocking behavior:

  • concurrency=N: blocked until all N actors were ready
  • concurrency=(1, N): blocked until 1 actor was ready

After this change, wait_for_min_actors_s stays at default (-1), so:

  • No blocking occurs regardless of concurrency config
  • Processing starts as soon as any actor is ready
  • Users can still set wait_for_min_actors_s manually if they want blocking/timeout behavior

Related

Reproduction / Proof

See: https://gist.github.com/nrghosh/68d63040e92b82987c67e4dee6c8f40f

Test Plan

  • Added tests verifying Processor does not override wait_for_min_actors_s
  • Added tests verifying concurrency config correctly maps to ActorPoolStrategy

Issue ray-project#53124 (GPU resource leakage) is now fixed. Remove the
workaround that set wait_for_min_actors_s=600.

This restores default Ray Data behavior where processing starts
as soon as any actor is ready, rather than blocking for min_actors.

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Verify that:
- Processor does not override wait_for_min_actors_s (default preserved)
- User-set wait_for_min_actors_s values are preserved
- Concurrency config correctly maps to ActorPoolStrategy min/max size

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Resource cleanup issues are now fixed (Issue ray-project#53169) including actor
__del__ invocation

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly removes two workarounds in the Ray Data LLM Processor that are no longer necessary due to upstream fixes. The removal of the hardcoded wait_for_min_actors_s and _enable_actor_pool_on_exit_hook overrides simplifies the code and restores the default, non-blocking behavior. The newly added tests are comprehensive, effectively verifying that the processor no longer overrides these DataContext settings and that the concurrency configuration is correctly passed through to the ActorPoolStrategy. The changes are clean and well-tested.

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
@nrghosh nrghosh added data Ray Data-related issues llm go add ONLY when ready to merge, run all tests labels Jan 14, 2026
@nrghosh nrghosh marked this pull request as ready for review January 14, 2026 20:52
@nrghosh nrghosh requested a review from a team as a code owner January 14, 2026 20:52
@kouroshHakha kouroshHakha changed the title Remove DataContext overrides in Ray Data LLM Processor [Data][LLM] Remove DataContext overrides in Ray Data LLM Processor Jan 14, 2026
@kouroshHakha kouroshHakha merged commit bef2442 into ray-project:master Jan 14, 2026
7 checks passed
jeffery4011 pushed a commit to jeffery4011/ray that referenced this pull request Jan 20, 2026
…ay-project#60142)

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Signed-off-by: jeffery4011 <jefferyshen1015@gmail.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Feb 3, 2026
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
…ay-project#60142)

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
…ay-project#60142)

Signed-off-by: Nikhil Ghosh <nikhil@anyscale.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues go add ONLY when ready to merge, run all tests llm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants