feat: peak gen throughput metric in sa-bench + server-side node metrics CSV export#93
Open
zhengd-nv wants to merge 9 commits intoNVIDIA:mainfrom
Open
feat: peak gen throughput metric in sa-bench + server-side node metrics CSV export#93zhengd-nv wants to merge 9 commits intoNVIDIA:mainfrom
zhengd-nv wants to merge 9 commits intoNVIDIA:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
=======================================
Coverage ? 70.35%
=======================================
Files ? 60
Lines ? 6595
Branches ? 0
=======================================
Hits ? 4640
Misses ? 1955
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
ping me on slack when ready to merge |
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
This PR adds two complementary gen-throughput measurement capabilities:
Client-side: peak gen throughput in sa-bench (
benchmark_serving.py)Adds a
peak_output_tokens_per_smetric to align with sglangbench_serving.py's peak gen throughput reporting.start_timeand per-chunktext_chunkson eachRequestFuncOutputacross all backends (OpenAI completions, chat completions, TRT-LLM, Dynamo).start_time + ttft + cumulative ITL. Because sa-bench ITL is per SSE chunk (not per token), each chunk's text is tokenized to get an accurate token count.peak_output_tokens_per_s.output_throughputand included in the JSON result.Server-side: per-node batch metrics CSV export (
analysis/srtlog)Adds
analysis/srtlog/export_node_metrics.pyto extract batch-level metrics from prefill/decode Slurm logs and write them to CSV. Server-side data captures bothrunning_reqandgen_throughputper batch step, enabling more precise analysis of how gen throughput varies with concurrency — something the client-side metric cannot provide.{node}_{worker_type}_{worker_id}.csv; columns cover all batch fields (token usage, queue depth, throughput, etc.).gen_throughput.csvsummary groups byrunning_reqand reports count/mean/median ofgen_throughput.python -m analysis.srtlog.export_node_metrics <run_path>benchmark.export_node_metrics: truein the job config; runs in an ephemeral venv to avoid polluting the container environment.NodeAnalyzer.parse_run_logs()now also scans<run_path>/logs/(matching the actual srt-slurm job output layout).RunMetadata.format_date()handles additional timestamp formats (%Y-%m-%d %H:%M:%S[.%f]).Usage
Peak output token throughput (tok/s)appears in output and the value is plausible relative toOutput token throughput. Verifypeak_output_tokens_per_sis present in the JSON result file.python -m analysis.srtlog.export_node_metrics <run_path>on a completed job directory; confirm per-node CSVs andgen_throughput.csvare created underlogs/node_metrics/.benchmark.export_node_metrics: truein a job config and confirm CSVs are written automatically at the end of a sweep.