Remove unused RolloutServer.all_engines for encapsulations#939
Open
fzyzcjy wants to merge 17 commits intorollout_ft/21from
Open
Remove unused RolloutServer.all_engines for encapsulations#939fzyzcjy wants to merge 17 commits intorollout_ft/21from
fzyzcjy wants to merge 17 commits intorollout_ft/21from
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the all_engines property from the RolloutServer class. Feedback indicates that this removal is premature, as the property is necessary for maintaining consistency across all ranks in multi-node configurations and provides better encapsulation for external callers compared to accessing internal server groups directly.
I am having trouble creating individual review comments. Click here to see my feedback.
miles/ray/rollout/rollout_server.py (161-163)
Removing all_engines from RolloutServer appears to be premature and potentially counter-productive to the goal of encapsulation for the following reasons:
- Correctness in Multi-node: Currently, methods like
offload,onload, andcheck_weightsinServerGroup(and the weight update logic inRolloutManager) rely on theenginesproperty, which only includes node-0 actors. In multi-node Tensor Parallel (TP) configurations wherenodes_per_engine > 1, this results in operations only being applied to a subset of actors, leaving others (on different nodes) in an inconsistent state.all_enginesis the correct collection to use for these operations to ensure all ranks are reached. - Encapsulation: In
RolloutManager._try_ci_fault_injection, the code currently reaches intoself._server.server_groups[0].all_engines. IfRolloutServer.all_engineswere available, it would provide a cleaner, higher-level interface that hides the internal group structure. Removing it forces external callers to depend on the internalserver_groupsimplementation details.
I recommend retaining this property and using it to address the existing multi-node inconsistencies in the rollout orchestration logic.
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.
No description provided.