Repository navigation
fix(stargate-bench): measure validated stream output - #1826
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/nvcf/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe mock chat service can emit streamed usage metadata. The benchmark driver validates SSE responses and records observed output tokens. Scoring uses observed tokens for output metrics and suppresses those metrics when usage is missing or totals overflow. ChangesStargate benchmark accuracy
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant benchmark_usage_test
participant stargate-bench
participant mock-dynamo
participant score
benchmark_usage_test->>mock-dynamo: Start server and wait for readiness
benchmark_usage_test->>stargate-bench: Run benchmark manifest
stargate-bench->>mock-dynamo: Request streamed completion with usage
mock-dynamo-->>stargate-bench: Return SSE content, usage, and [DONE]
stargate-bench->>score: Provide observed output tokens
score-->>benchmark_usage_test: Produce benchmark metrics
Merge Risk: ⚪ Minimal · up to The dependency inventory matches the benchmark's declared dependency. No actionable merge-blocking risk was identified in the selected change; normal validation still applies. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 41.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 43 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
96fd955 to
54b3e6e
Compare
🛡️ CodeQL Analysis🚨 Found 5 issue(s) Severity Breakdown:
📋 Top Issues🔗 View full details in Security tab 🕐 Last updated: 2026-09-11 22:27:38 UTC | Commit: 54b3e6e |
b3e0b9f to
6f1913e
Compare
4264894 to
a10bd5a
Compare
a10bd5a to
59bb253
Compare
fa89124 to
7858489
Compare
ec6dc77 to
4e0ef82
Compare
3a44d14 to
98e62e7
Compare
98e62e7 to
a73c543
Compare
Normalize CR, LF, and split CRLF boundaries and strip a single initial UTF-8 BOM across chunks. Bound buffered events, discard empty events promptly, and keep UTF-8 fixtures in ASCII source. Refs: #1817
Honor include_usage with final generated-token counts and preserve the existing stream shape when usage is not requested. Verify the real mock-to-driver path with a Bazel test using declared executable inputs. Refs: #1817
Add sse-core 0.2.3 under its Apache-2.0 license with only the std feature. Replace custom SSE framing with its bounded decoder and keep completion, usage, and output timing checks in the benchmark driver. Relates to #1817
Only the presence of missing output usage affects scoring. Replace the unused numeric counts with boolean latches while preserving separate successful-request and per-group coverage. Relates to #1817
Relates to #1817 Signed-off-by: jcameron <jcameron@nvidia.com>
Relates to #1817 Signed-off-by: jcameron <jcameron@nvidia.com>
e4c8e02 to
2b07df4
Compare
|
🎉 This PR is included in src/libraries/rust/stargate/v0.19.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
This PR is included in version 1.29.2. The release is available on GitHub release. |
|
This PR is included in version 1.69.1. The release is available on GitHub release. |
|
This PR is included in version 1.25.1. The release is available on GitHub release. |
|
This PR is included in version 1.14.2. The release is available on GitHub release. |
|
This PR is included in version 1.10.1. The release is available on GitHub release. |
|
This PR is included in version 0.5.1. The release is available on GitHub release. |
|
This PR is included in version 0.9.1. The release is available on GitHub release. |
TL;DR
Benchmark success and throughput must reflect completed inference output. Empty or truncated HTTP 200 responses previously counted as successful, requested token limits inflated generated output, and native mock streams omitted usage.
This change validates SSE completion and records observed completion tokens separately from requested limits. Missing external and legacy usage stays unavailable; a reported zero remains available.
Additional Details
[DONE].stream_options.include_usagein mock-dynamo. A five-token context with a two-token prompt reports three generated tokens even when the request permits 100.Customer Release Notes
Stargate benchmarks reject incomplete success responses and report observed output usage. Native mock streams provide actual token counts when requested; missing external usage remains unavailable.
Plan Summary
Not applicable.
Usage
Request results add
observed_output_tokens. Existingoutput_tokensretains the requested workload limit. The driver requests streamed usage automatically; direct mock requests may enablestream_options.include_usage.Dependencies
Added sse-core 0.2.3 with default features disabled and only
stdenabled. Its enabled dependencies were already present; no other package versions change. Independent audit verified the published Apache-2.0 license, allowlist compatibility, maintained source, copyright attribution, archive checksum and Cargo/Bazel metadata. Benchmark NOTICE and the regenerated root NOTICE index match. Independent license and attribution verification passed. Exact 842e500 license and generated-document CI passed.For the Reviewer
Review stream validation and usage selection in
driver.rs, count availability and aggregation inscore.rs, and native mock framing inmock-dynamo/src/openai.rs.Independent main-source probes reproduced empty/truncated stream success, empty role timing, missing refusal timing and missing usage. The current-main native mock also omits usage when requested. Both original review findings were reproduced: null completion usage masks a cumulative fallback, and two
u64::MAXobservations panic. Regressions also cover unavailable overflow metrics across separate backends.This PR targets main after #1818, #1820 and #1823 merged. All ten benchmark patches were independently verified unchanged after history reconciliation. Current main 31f98a9 was merged normally; the final diff contains only this 15-file benchmark layer. Both actionable review threads are resolved.
For QA
Native validation on 51ea4f8 passes 164 benchmark and 36 mock tests, with zero failures or ignored tests, plus executable integration and all-target Clippy with warnings denied. Two registration metric regressions also pass. Current 842e500 has identical Stargate source and dependency metadata; these results apply to its unchanged code. Integration and scoped formatting pass again. Integration requests 100 tokens and records three observed tokens. Workspace-wide formatting reports existing differences in three unchanged Stargate files. Whitespace and fanout pass.
Pinned TruffleHog 3.95.2 scanned the complete history from the earlier common fork: 382 chunks, 239452 bytes, zero results and exit 0. Local Bazel setup was blocked before tests; Linux CI provides Bazel validation. Prior 6e4b22c/mainc55bea3f CI passed all 27 entries and all 11 required/relevant jobs. Current 842e500/main31f98a9e passes all 27 CI entries; all 11 required and relevant jobs explicitly succeed, including root/Stargate Bazel, Rust CodeQL, secrets, license/NOTICE and generated dependency docs. The latest main update changes only the separate rate limiter; Stargate remains unchanged.
No GPU or live-cluster campaign was run. Additional performance QA is not needed for these correctness changes. The benchmark artifact and standard mock usage fields require no NVCF CLI change.
Issues
Relates to #1817
Related Pull Requests
#1818, #1820 and #1823 merged. This final layer targets main.
References
Checklist