[train] implement BaseWorkerGroup for V1/V2 compatibility#57151
Merged
matthewdeng merged 7 commits intoray-project:masterfrom Oct 4, 2025
Merged
[train] implement BaseWorkerGroup for V1/V2 compatibility#57151matthewdeng merged 7 commits intoray-project:masterfrom
BaseWorkerGroup for V1/V2 compatibility#57151matthewdeng merged 7 commits intoray-project:masterfrom
Conversation
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
justinvyu
approved these changes
Oct 3, 2025
Contributor
justinvyu
left a comment
There was a problem hiding this comment.
Thanks! Address the cursor comment and should be good
|
|
||
|
|
||
| @DeveloperAPI | ||
| class WorkerGroupInterface(abc.ABC): |
Contributor
There was a problem hiding this comment.
Suggested change
| class WorkerGroupInterface(abc.ABC): | |
| class RayWorkerGroup(abc.ABC): |
Contributor
There was a problem hiding this comment.
And then subclasses can be RayTrainWorkerGroup
Contributor
Author
There was a problem hiding this comment.
Renamed to be BaseWorkerGroup
Comment on lines
+167
to
+168
| resources = worker_group.get_resources_per_worker() | ||
| num_gpus_per_worker = resources.get("GPU", 0) |
Contributor
There was a problem hiding this comment.
great no more sketchy stuff here!
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
Signed-off-by: Matthew Deng <[email protected]>
BaseWorkerGroup for V1/V2 compatibility
dstrodtman
pushed a commit
that referenced
this pull request
Oct 6, 2025
**Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Seiji Eicher <[email protected]>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
eicherseiji
pushed a commit
to eicherseiji/ray
that referenced
this pull request
Oct 6, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
liulehui
pushed a commit
to liulehui/ray
that referenced
this pull request
Oct 9, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
joshkodi
pushed a commit
to joshkodi/ray
that referenced
this pull request
Oct 13, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Josh Kodi <[email protected]>
justinyeh1995
pushed a commit
to justinyeh1995/ray
that referenced
this pull request
Oct 20, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]>
Aydin-ab
pushed a commit
to Aydin-ab/ray-aydin
that referenced
this pull request
Nov 19, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Aydin Abiar <[email protected]>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
…ect#57151) **Problem:** Backend configurations were tightly coupled to V1 `WorkerGroup`, relying on methods/attributes to implemented in V2 `WorkerGroup`. **Solution:** * Add `BaseWorkerGroup` defining common methods (`execute`, `__len__`, `get_resources_per_worker`, etc.) * Both V1 and V2 `WorkerGroup` now implement the interface * Update all backend configs to use `BaseWorkerGroup` instead of V1 `WorkerGroup` * **Note:** Horovod explicitly uses V1 WorkerGroup directly because it is not implemented for V2. --------- Signed-off-by: Matthew Deng <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem: Backend configurations were tightly coupled to V1
WorkerGroup, relying on methods/attributes to implemented in V2WorkerGroup.Solution:
BaseWorkerGroupdefining common methods (execute,__len__,get_resources_per_worker, etc.)WorkerGroupnow implement the interfaceBaseWorkerGroupinstead of V1WorkerGroup