feat(metrics): full-run OSL over all agentic turns for accuracy validation - #504
Open
arekay-nv wants to merge 1 commit into
Open
feat(metrics): full-run OSL over all agentic turns for accuracy validation#504arekay-nv wants to merge 1 commit into
arekay-nv wants to merge 1 commit into
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
arekay-nv
force-pushed
the
arekay/issue_500
branch
from
September 11, 2026 17:01
641b862 to
a520416
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #504 +/- ##
=======================================
Coverage ? 80.88%
=======================================
Files ? 154
Lines ? 21194
Branches ? 0
=======================================
Hits ? 17143
Misses ? 4051
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
arekay-nv
force-pushed
the
arekay/issue_500
branch
from
September 11, 2026 17:34
a520416 to
34eae00
Compare
arekay-nv
marked this pull request as ready for review
September 11, 2026 17:48
leopck
approved these changes
Sep 11, 2026
leopck
left a comment
Collaborator
There was a problem hiding this comment.
tested with high concurrency runs previously was heavily impacted after this PR fix, my mean OSL is stable on high concurrency and matching with low concurrency runs
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
Resolves #500.
Agentic-inference runs stop performance tracking when the first active user finishes its final trajectory, so turns issued after that boundary are excluded from the windowed output-sequence-length (OSL). Because the excluded tail depends on concurrency, the reported mean OSL differs across Pareto points even when the model produces identical output — which biases the per-turn mean OSL accuracy requirement (see the Tail Management section).
This PR adds a separate full-run OSL computed over every completed turn — tail and dataset repeats included — for use as the accuracy-gate statistic, while leaving the windowed OSL untouched for throughput.
What changed
commands/benchmark/full_run_osl.py(new): a post-finalize, streaming, prefix-gated scan ofevents.jsonlthat rolls up OSL over all in-population COMPLETE turns. The population is bounded to the performance phase viasample_idx_map.jsonand fails closed (skips) when that map is unavailable, so accuracy-phase turns can never be counted as performance OSL. Reportsn_turns_counted/n_empty/n_errors/n_undecodableso a partial or all-blank run stays visible rather than looking uncomputed.metrics_aggregator/tokenization.py:output_tokenization_input— the single shared rule for how a model output (including reasoning and tool calls) is rendered for counting. Both the windowedOslTriggerand the full-run scan use it, so the two numbers are directly comparable.metrics_aggregator/token_metrics.py:BatchTokenizer.count_syncfor finalize-side (post-event-loop) counting that matches the async path exactly; teardown is guarded so the in-process (n_workers=0) tokenizer never terminates unrelated child processes.commands/benchmark/execute.py: computes and attaches the block at finalize, inside the report-writingtry/finally(skipped on abort so a partial tail is never reported as complete).metrics/report.py: new optionaloutput_sequence_lengths_full_runfield, plus areport.txtline labeled as the accuracy OSL (with an explicit note when it is missing or the run is incomplete).examples/10_Agentic_Inference/README.md: documentsoutput_sequence_lengths_full_run.output_sequence_lengths.avgas the field to read for the OSL accuracy gate — a run is invalid for the gate when this isnull,n_turns_counted == 0, or the run is notcomplete.Testing
Includes the issue #500 (f) regression guard: the full-run mean stays identical when the performance window closes at different points, even as the windowed mean moves. (Pre-existing macOS-only IPC-socket / CPU-affinity test failures are unrelated to this change.)
Notes
Synccommit can be squashed/renamed on merge.output_tokenization_input, a direct test of the tokenizer-teardown guard) are not yet included.🤖 Generated with Claude Code