feat(sglang): relay forward pass metrics to event plane#7376
Closed
ishandhanani wants to merge 3 commits intoai-dynamo:mainfrom
Closed
feat(sglang): relay forward pass metrics to event plane#7376ishandhanani wants to merge 3 commits intoai-dynamo:mainfrom
ishandhanani wants to merge 3 commits intoai-dynamo:mainfrom
Conversation
…elay Extend DynamoSglangPublisher with init_fpm_relay() to subscribe to sglang's new ForwardPassMetrics ZMQ PUB and relay to the Dynamo event plane. Uses the same FpmEventRelay Rust binding as the vLLM integration. Gated behind DYN_FORWARDPASS_METRIC_PORT env var. Creates one relay per local DP rank, handles multi-node DP attention topology.
Contributor
|
👋 Hi ishandhanani! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
4 tasks
Map DYN_FORWARDPASS_METRIC_PORT env var to sglang's new server_args.forward_pass_metrics_port in args.py. The publisher reads from server_args instead of env var directly.
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.
Summary
DynamoSglangPublisherwithinit_fpm_relay()to subscribe to sglang's ForwardPassMetrics ZMQ PUB and relay to the event planeDYN_FORWARDPASS_METRIC_PORTenv var to sglang'sserver_args.forward_pass_metrics_portinargs.pyFpmEventRelayRust binding as the vLLM integration (feat: ForwardPassMetrics dynamo event plane integration #7250)Motivation
Companion to sgl-project/sglang#20567 which adds per-iteration ForwardPassMetrics emission from sglang's scheduler. This PR wires the Dynamo side to receive those metrics and forward them to the event plane for consumption by the planner.
Architecture
Changes
args.py: MapDYN_FORWARDPASS_METRIC_PORTenv var toserver_args.forward_pass_metrics_portbefore engine creationpublisher.py: Addinit_fpm_relay()method reading port fromserver_args, cleanup incleanup(), call fromsetup_sgl_metrics()Test plan
--forward-pass-metrics-port 20380emits prefill/decode metrics per iteration