Skip to content

Directly call SGLang engines instead of via ray actors in trainers and remove SGLangEngine shells - #1861

Open
fzyzcjy wants to merge 1 commit into
tom/refactor-miles/op3-17from
tom/refactor-miles/op3-3
Open

Directly call SGLang engines instead of via ray actors in trainers and remove SGLangEngine shells#1861
fzyzcjy wants to merge 1 commit into
tom/refactor-miles/op3-17from
tom/refactor-miles/op3-3

Conversation

@fzyzcjy

@fzyzcjy fzyzcjy commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Part of #1837

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch from 717cf48 to 33003ed Compare August 3, 2026 23:44
@fzyzcjy
fzyzcjy requested a review from Rockdu as a code owner August 3, 2026 23:44
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch 2 times, most recently from 28437a3 to 51e1316 Compare August 4, 2026 00:39
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch 2 times, most recently from 411ecf3 to c4f937d Compare August 4, 2026 06:57
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch 2 times, most recently from 5c849ef to cefbc28 Compare August 6, 2026 07:03
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch from c4f937d to 5e0612a Compare August 10, 2026 06:06
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch 2 times, most recently from 30e603f to 282b8b1 Compare August 10, 2026 16:07
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch from 048f68b to fe7eb04 Compare August 10, 2026 16:34
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch from 282b8b1 to 7db556d Compare August 10, 2026 16:34
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch from fe7eb04 to b731661 Compare August 12, 2026 02:48
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch 2 times, most recently from 73ad0f9 to 7bec756 Compare August 12, 2026 14:31
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch 2 times, most recently from 0c54b25 to ad934dc Compare August 12, 2026 23:56
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch from 7bec756 to 7e64fa5 Compare August 12, 2026 23:56
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch from 7e64fa5 to 5e720db Compare August 13, 2026 01:13
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-3 branch from 5e720db to 7b79e2d Compare August 13, 2026 06:01
@fzyzcjy
fzyzcjy force-pushed the tom/refactor-miles/op3-17 branch from ad934dc to 6f3ba41 Compare August 13, 2026 06:01
…d remove SGLangEngine shells

Squashed from:
- Talk to the engines over HTTP from the trainer too, and drop the engine shells
- Fix the trainer-side HTTP conversion found by auditing op3-3
- Release the rollout lock on failure, and cover the orderings that were only implicit
async_utils.wait_futures(
[async_utils.submit(client.pause_generation()) for client in self.rollout_engines]
)
async_utils.wait_futures([async_utils.submit(client.flush_cache()) for client in self.rollout_engines])

@guapisolo guapisolo Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[non-blocking] potential perf issue? My codex said.
original cost = max_i(pause_i + flush_i)
new cost = max_i(pause_i) + max_i(flush_i)
Seems trivial. non-blocking

@guapisolo guapisolo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving this PR for the #2176 safe-merge checkpoint. It completes the trainer-side migration from Ray actor API shells to direct SGLangApiClient calls while keeping engine process lifecycle ownership and synchronization explicit. I left a non-blocking performance question about the stronger fleet-wide pause/flush barrier, but no blocking finding remains through the checked chain tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants