Repository navigation
fix(megatron): stream generate_async without .options() so Ray 2.58 accepts it - #4469
Merged
Merged
Conversation
…ccepts it Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 7ec559d |
4 tasks done
terrykong
enabled auto-merge (squash)
October 4, 2026 07:08
This was referenced Oct 4, 2026
saumishr
approved these changes
Oct 4, 2026
ZhiyuLi-Nvidia
pushed a commit
that referenced
this pull request
Oct 4, 2026
Resolve conflicts with advantage actors (#4469 base): checkpoint workers, SingleControllerActorArgs and test fakes keep both storage_units and advantage_actors. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Zhiyu Li <[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.
v0.8 mirror #4468
What broke
After the Ray 2.58 bump (#4419), every Megatron generation call fails:
This breaks these L1 jobs:
Megatron_Generation(H100 and GB200),GB200_Megatron_Omni, andGB200_Megatron_Omni_Single_Controller.Why
MegatronGeneration.generate_asynccallsworker.generate_async.options(num_returns="streaming"). The driver process cannot import the Megatron worker class (it lives in an isolated venv), so Ray gives the handle a placeholder class whose methods are not marked as generators. Ray 2.58 added a check inActorMethod.options()that rejectsnum_returns="streaming"on non-generator methods. Ray 2.56 did not have this check.ActorMethod._remote()does not run it.Fix
Call
_remote(..., num_returns="streaming")directly instead of.options(...).remote(...). One file, no behavior change on older Ray.Testing
On #4463, with Ray 2.58 and only the failing L1 jobs enabled:
🤖 Generated with Claude Code