Repository navigation
Conversation
Adds benchmarks/contextual_earnings22: transcription of the 772 Contextual Earnings-22 test segments with no, local or global keyword context (pinned dataset revision), scored by the audio_eval server for corpus WER and keyword precision, recall and F1 (evaluator and metrics modules adapted from NeMo Skills, discovered by name), with the attribution row. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
| ], | ||
| "expected_answer": sample["norm_text"], | ||
| "expected_answer_cased": sample["text"], | ||
| "keyword_list": local_keywords, |
There was a problem hiding this comment.
In global mode the model sees the full call vocabulary, but the scorer only checks the local list for false positives. On 4469291_chunk82, appending the globally prompted, unspoken name Katerina leaves precision at 100%. Including it in the candidate vocabulary gives four true positives and one false positive (80%). Could we score global distractors as well and add this case to the tests? Benchmark keyword-precision definition
| "keyword_list": local_keywords, | ||
| "local_keywords": local_keywords, | ||
| "global_keywords": global_keywords, | ||
| "subset_for_metrics": sample["file_id"], |
There was a problem hiding this comment.
The released file_id includes the _chunkNN suffix. The first 100 rows have 100 distinct file_id values but come from 32 calls, so the documented per-call metrics are emitted per chunk. Could we use the parent call ID for subset_for_metrics and keep the full ID for clip provenance?
| if "correct" in agg_metrics: | ||
| agg_metrics["success_rate"] = agg_metrics["correct"] | ||
| if "no_answer" in agg_metrics: | ||
| # The base metrics double-count empty answers; halve as the other audio_eval metrics do. |
There was a problem hiding this comment.
BaseMetrics increments pass@1 once for an empty answer, and the majority path starts at k=2. This division implements the documented legacy half-rate. Could we correct the comment so future changes to the base counter don’t accidentally change this metric?
…tors and per-call groups - Profiles no longer enable loop cleanup: the primary WER and keyword metrics score the original model output, so repeated words count as insertions (regression: `profit rose` vs `profit` x20 + `rose` is 19 insertions, 950%). - In global mode the scored keyword vocabulary includes the prompted call-wide keywords, so a prompted but unspoken name written by the model is a false positive; keywords that normalize to the same tokens are scored once. - `subset_for_metrics` is the parent call (the `_chunkNN` suffix is dropped); the full `file_id` stays in each row. Preparation schema version 3. - `max_samples_per_profile` accepts only positive integers (not bool, float, str, 0, negatives), validated before any dataset access. - Describe `no_answer` as the legacy half-rate scaling convention; README lists the metric keys that `get_metrics()` returns, asserted by a test. Empty references and hypotheses are tested. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
…ent the global scoring rule Drop the half-rate division of no_answer; the published value is the share (%) of empty generations. State in the README that the global-mode keyword rule is this port's interpretation of the paper (arXiv 2604.07354), that the paper's code was not public, and that the aggregation and normalizer are the port's own. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
…t in every condition Follow the OpenBench reference implementation (argmaxinc/OpenBench, earnings22-keywords): keyword precision, recall and F1 are scored against the clip's own dictionary in the contextless, local and global conditions; the global condition only prompts the model with the call-level list, so distractors it writes are not false positives. Remove candidate_keywords, bump the preparation schema version to 4 so stale prepared data is not reused, and state in the README what still differs from OpenBench. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
|
Update on keyword scoring: this PR now follows Argmax's OpenBench implementation of Contextual Earnings-22 ( What changed (head d23dc02):
What still differs from OpenBench (also stated in the README): we use the Open ASR normalizer and our own Levenshtein-based occurrence matching instead of OpenBench's Whisper normalizers, |
What does this PR do?
Adds the
contextual_earnings22benchmark: transcription of the 772 test segments of Contextual Earnings-22 (15-second windows of earnings calls) with no keyword context, with the clip's own keyword list, or with the keyword list of the whole call. It is scored by theaudio_evalserver (merged in #6249) for corpus WER and keyword precision, recall and F1; the evaluator and metrics modules are two new files that the server finds by name.Why. Keyword prompting is a common way to bias a speech model toward rare names and terms, and a plain WER hides whether the keywords were actually recovered. This public dataset measures both, in three prompt conditions over the same audio. It is one benchmark per PR in a series of speech and audio benchmarks that reuse the
audio_evalserver and its profile format.Related issue: none; a new benchmark.
What changed
benchmarks/contextual_earnings22/:config.yaml(agent and environment server wiring),manifest.yaml(domain: asr,licensing: CC-BY-SA-4.0, experimental),profiles.json(three profiles:contextless,local,global),prepare.py,README.md,data/.gitignore.resources_servers/audio_eval/_scoring/evaluation/evaluator/contextual_earnings22.pyandmetrics/contextual_earnings22_metrics.py: the evaluator (WER with edit-distance alignment, keyword true/false positives and false negatives,basicoropen_asrnormalization) and its corpus-level metrics. Both are found by name from the profile (++eval_type=contextual_earnings22,METRICS_TYPE: contextual_earnings22); no registry is edited. They are adapted from NeMo Skills (see Provenance).tests/unit_tests/benchmarks/test_contextual_earnings22_benchmark.py(declaration, profile contract through the server's own lookup, row building per mode, audio checks,prepare()against a synthetic parquet file, offline) andresources_servers/audio_eval/tests/test_scoring_contextual_earnings22.py(alignment, keyword counts, normalization modes, corpus metrics with hand-counted rows).ATTRIBUTIONS.md: one row for the adapted NeMo Skills evaluator and metrics.Preparation.
prepare()downloads the pinnedargmaxinc/contextual-earnings22testparquet file (357 MB), checks its SHA-256 and its row count (772), and writes each clip as 16 kHz mono 16-bit WAV (about 0.37 GB). It writes three rows per clip by default (2,316 rows);modesnarrows the set, andmax_samples_per_profilemust be a positive integer (booleans, floats, strings, 0 and negative values are rejected before the dataset is read; a capped smoke run still downloads the whole parquet file).Scoring. Text is normalized with the Open ASR English normalizer (
normalization_mode=open_asr, fromresources_servers/asr_with_pc) applied to the hypothesis, the cased reference and the keywords. A keyword is a true positive only when its reference occurrence aligns, by minimum edit distance, to identical, contiguous hypothesis tokens. The primary metrics score the original model output: the profiles do not enable generation-loop cleanup, so a repeated word counts as insertions (referenceprofit roseagainstprofitx20 followed byroseis 19 insertions, 950% WER; a regression test pins it). Auxiliary scores on loop-cleaned text come with the genericaudio_evalserver option that scores the cleaned text through the same evaluator and publishes it as a separate group; it is enabled per profile with a one-line change once that option lands. Keyword precision, recall and F1 are scored against the clip's own keyword dictionary in every condition (contextless,localandglobal); theglobalcondition only prompts the model with the call-level list, so a distractor that the model writes is not a false positive. Keyword spellings that normalize to the same tokens (GWENTandGwentin a call-wide list) are one keyword. An unknownnormalization_modeis rejected when the evaluator is constructed.Relation to the reference implementation. Scoring follows the OpenBench reference implementation (https://github.com/argmaxinc/OpenBench, benchmark
earnings22-keywords; keyword precision, recall and F-score insrc/openbench/metric/keyword_boosting_metrics/boosting_metrics.py, the keyword list per clip insrc/openbench/runner/benchmark.py): keywords are scored against the clip's own list (the datasetdictionarycolumn) in every condition, and the global condition only prompts with the call-level list, including distractors. The context definitions are those of the paper (arXiv:2604.07354). What still differs from OpenBench: this port uses the Open ASR normalizer rather than OpenBench's Whisper normalizers, and its own Levenshtein-based occurrence matching rather than texterrors alignment and windowed n-grams; the pooled-over-corpus aggregation matches. These differences can shift the numbers slightly, and the scores have not been compared with the numbers Argmax published.Metrics (
audio/<profile>/pass@1/*, and per call underaudio/<profile>-<call_id>/pass@1/*, where the call is the releasedfile_idwithout its_chunkNNsuffix; the fullfile_idstays in every row for clip provenance):wer,keyword_precision,keyword_recall,keyword_f1(percent; a keyword metric is absent when its denominator is zero),success_rate(share of clips with WER below 50%),num_entries,avg_tokens,gen_secondsandno_answer.no_answeris the true share (%) of empty generations (the base counter adds an empty answer topass@1once and the value is published as is, with no scaling). A test asserts that the README lists the metric keys thatget_metrics()returns. Only one generation per clip is supported (max_kother than 1 raises).Validation
All run on this branch, on top of
upstream/mainat242a9b0137:tests/unit_tests/benchmarks/test_contextual_earnings22_benchmark.pyin the core environment withoutsetuptools(as in CI), in a container with a working.git: 14 passed.tests/unit_tests/test_public_api_facades.py(tests import each name from the module that defines it): 1034 passed.tests/unit_tests/benchmarks/test_prepare_hydra_arguments.py(every benchmark's offlineprepare()tests with Hydra-typed arguments): 4 passed.tests/unit_tests/benchmarks,tests/unit_tests/environment,tests/unit_tests/toolingandtests/unit_tests/test_public_api_facades.py, in the container with.git: 4085 passed, 12 skipped, 1 failed (test_environment_validation.py::test_resolve_config_servers_logs_unresolvable_configs[recursive_alias-ConfigError]: aRecursionErrorfrom the installed OmegaConf where the test expectsConfigError; it uses a synthetic config, touches nothing of this PR, and comes from the local test environment).gym env test --resources-server audio_eval: 221 passed (the cases of this PR are intest_scoring_contextual_earnings22.py: a prompted word outside the clip dictionary is not a false positive, repeated words as insertions, empty reference and hypothesis, mixed-group aggregation, normalized duplicate keywords, and the README metric-key contract; the open_asr cases run there because the server environment has the normalizer's dependency).gym env validateand a capped realgym eval prepareplusgym env publishwere run on the earlier revision (6 rows, 4 verifier cases); this revision does not touchconfig.yamlor the manifest, and its preparation changes (call grouping, the clip-level keyword list in every condition, cap validation, preparation schema version 4) are covered by the offlineprepare()tests against a synthetic parquet file. They were not repeated against the 357 MB real download.gym eval prepare --benchmark contextual_earnings22 +prepare_script_args.max_samples_per_profile=2against the real dataset (6 rows, 2 clips, audio written and checked), thengym env publish contextual_earnings22 --kind benchmark: succeeded, 4 verifier cases.basicnormalization in the profiles, false positives not counted) are still caught. Files were restored afterwards.no_answershare. After the change that reports the share as is (no division), re-run: the benchmark test file,test_public_api_facades.pyandtest_prepare_hydra_arguments.pyin the container with.git: 1053 passed;test_scoring_contextual_earnings22.pyin the server environment: 18 passed. Mutation: restoring the division makestest_no_answer_is_the_empty_share(one empty of two generations must give 50.0) fail; the file was restored afterwards.ruff checkandruff format --checkon the changed files, scopedpre-commit run --files ...(ruff, ruff-format, end of files, trailing whitespace, guardwords): passed. The repository'sdetect-secretsstep (repository baseline) on the changed files: exit 0.Rollouts
What ran
nvidia/NVIDIA-Nemotron-3.5-Transcribe-30B-A4B), served withvLLM 0.32.0 and the NeMo-Speech vLLM plugin on one H100 (the model-card stack, MTP speculative decoding with 2 tokens).
--max-samples-per-profile 100), 300 requests:contextless(a plaintranscription prompt),
local(the prompt lists the keywords of that clip) andglobal(the prompt lists the call-wide keyword list,some of which are not in the clip). Request settings: greedy, thinking off, a 256-token limit.
gym eval prepare,gym env start(theaudio_evalenvironment with this benchmark's profiles) andgym eval run --no-serve --agent contextual_earnings22_simple_agent.Run health
complete: true, 0 masked, 0 failed, 0 request errors. All responses havestatus
completed; none is empty and none reached the token limit (45 output tokens on average, 76 at most).no_answeris 0.0in every context.
Metrics (
audio/contextual-earnings22.<context>/pass@1/*, 100 entries each)werkeyword_recallkeyword_precisionkeyword_f1success_ratecontextlessgloballocalRe-scored offline from the saved outputs. Per-call values (one group per call) are published as well: with the parent-call grouping the 100 clips of each context fall into 32 calls (the earlier revision emitted 100 per-clip groups).
success_rateis the share of clips with WER below 50%.What the rollouts show
with the clip's own keywords (95.4), and WER falls in the same order (13.99, 11.63, 10.77). Precision stays near 93 to 95 in all three, so the keywords in the prompt are used when present; keywords are scored against the clip's own dictionary, so distractors that the model might write are not counted.
the reference
trip com group s ...thelocaloutput writesTrip.com group's, while without context the same kind ofname is spelled by ear (
mmtblackin the reference,MMT Blackin acontextlessoutput).seventy two thousandfor the reference's digits): the scorer's open-ASR normalization maps the two formsto the same string, as the benchmark README states.
Limitations
selections.
success_rate(share of clips with WER below 50%) saturates at 98 to 99 and carries little information at this size.Commands (generic form)
Compatibility and benchmark impact
A new benchmark only: no existing server, benchmark or schema changes behavior. The manifest declares
domain: asr(added in #6246). Metric keys are new (audio/contextual-earnings22.<mode>/...). The rootpyproject.toml,uv.lockfiles,.github/and the rootREADME.mdare not touched; the benchmark's dependencies (soundfilefor preparation, plus what the server already locks) need no lock change.Provenance of vendored/adapted code
The evaluator and metrics are adapted from NeMo Skills; the modifications are listed in each file header and in
ATTRIBUTIONS.md.prepare.pyis written for this repository. The dataset is read at a pinned revision and not copied into the repository.nemo_skills/evaluation/evaluator/contextual_earnings22.pyandnemo_skills/evaluation/metrics/contextual_earnings22_metrics.pyda85a881d972e6fec847b90cf553a0bf9bf10638dataclassinstead ofnested_dataclass, theopen_asrnormalization mode, early validation of the mode, keywords that normalize alike scored once, console-display methods removedargmaxinc/contextual-earnings22testsplit59d7f94771cc197984d8038e494c83abeff87282prepare()Checklist
copyright-checkand the remoteguardwords-checkare left to CI (the local guardwords hook passed).🤖 Generated with Claude Code