Skip to content

[Data] Refactor DataContext to hold execution callback classes instead of instances#61293

Merged
bveeramani merged 14 commits intoray-project:masterfrom
limarkdcunha:task/execution-callback-simplify-diff-2
Feb 25, 2026
Merged

[Data] Refactor DataContext to hold execution callback classes instead of instances#61293
bveeramani merged 14 commits intoray-project:masterfrom
limarkdcunha:task/execution-callback-simplify-diff-2

Conversation

@limarkdcunha
Copy link
Copy Markdown
Contributor

Larger Issue
Refactored the execution callback system from dynamic, per-job injection to static, eager initialization. DataContext now serves as a stateless registry of callback factories, enabling the StreamingExecutor to load all callbacks at startup. Each callback then self-configures or no-ops based on the runtime environment.

Context

This is Part 2 of a four-part change set intended to resolve the issue described above.

Part 1 diff: #60480

Closes #60279.

@limarkdcunha limarkdcunha requested review from a team as code owners February 24, 2026 23:00
Copy link
Copy Markdown
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 continues the refactoring of the execution callback system by moving to a static, class-based registration in DataContext. The changes in ray.data.context are clear and introduce a factory for collecting callback classes. Additionally, the SGLang example is significantly improved to properly support multi-GPU configurations (TP/PP), with corresponding documentation and test updates. My review includes a suggestion to simplify and improve the correctness of resource bundle creation in the SGLang engine, aligning it with patterns used elsewhere in the codebase.

Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
@limarkdcunha limarkdcunha force-pushed the task/execution-callback-simplify-diff-2 branch from e51e942 to 1633933 Compare February 24, 2026 23:04
Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
@ray-gardener ray-gardener bot added the community-contribution Contributed by the community label Feb 25, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
@bveeramani bveeramani enabled auto-merge (squash) February 25, 2026 18:35
@bveeramani bveeramani disabled auto-merge February 25, 2026 18:35
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Feb 25, 2026
@bveeramani bveeramani enabled auto-merge (squash) February 25, 2026 18:36
@bveeramani bveeramani changed the title Task/execution callback simplify diff 2 [Data] Task/execution callback simplify diff 2 Feb 25, 2026
@limarkdcunha limarkdcunha changed the title [Data] Task/execution callback simplify diff 2 [Data] Refactor DataContext to hold execution callback classes instead of instances Feb 25, 2026
@github-actions github-actions bot disabled auto-merge February 25, 2026 21:13
@limarkdcunha limarkdcunha self-assigned this Feb 25, 2026
@bveeramani bveeramani merged commit 5ac4604 into ray-project:master Feb 25, 2026
6 checks passed
@limarkdcunha limarkdcunha deleted the task/execution-callback-simplify-diff-2 branch February 25, 2026 22:40
bveeramani pushed a commit that referenced this pull request Mar 25, 2026
…kage (#61405)

Larger Issue
Refactored the execution callback system from dynamic, per-job injection
to static, eager initialization. DataContext now serves as a stateless
registry of callback factories, enabling the StreamingExecutor to load
all callbacks at startup. Each callback then self-configures or no-ops
based on the runtime environment.

Context
This is Part 3 of a four-part change set intended to resolve the issue
described above.

Part 1 diff: #60480
Part 2 diff: #61293

Closes #60279.

---------

Signed-off-by: Limark Dcunha <limarkdcunha@gmail.com>
Signed-off-by: Limark Dcunha <83493294+limarkdcunha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Data] Simplify execution callback lifecycle

2 participants