Skip to content

feat(audio-metrics): in-memory input + agent-ready contracts - #2336

Open
shubhamNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
shubhamNvidia:agent/metrics
Open

feat(audio-metrics): in-memory input + agent-ready contracts#2336
shubhamNvidia wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
shubhamNvidia:agent/metrics

Conversation

@shubhamNvidia

Copy link
Copy Markdown
Contributor

Contracts: describe() + *_key params on the bandwidth, SQUIM and WER metric stages, including conditional_writes (a metric is only written when the audio resolves and estimation succeeds).

New functionality

  • In-memory input (input_residency) — read the waveform already in the task rather than re-opening the file for every metric stage. On a chain of several metric stages this removes one file read per stage per row.

Per-segment scoring and metric_skip_reason already existed upstream; the contracts here just declare them, so the planner knows a metric is written only when the audio resolves and estimation succeeds.

Depends on the agent-ready foundation, #2332 — that must merge first (this branch imports nemo_curator/stages/audio/_agent/, so CI here stays red until it lands).

Adds describe() contracts to the bandwidth, SQUIM and WER metric stages so a planner can tell what each reads and writes before running it.

Depends on the agent-ready foundation (nemo_curator/stages/audio/_agent/), which must merge first.

Signed-off-by: Shubham Bhawsar <shbhawsar@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@shubhamNvidia
shubhamNvidia marked this pull request as ready for review August 25, 2026 11:19
@shubhamNvidia
shubhamNvidia requested a review from a team as a code owner August 25, 2026 11:19
@shubhamNvidia
shubhamNvidia requested review from praateekmahajan and removed request for a team August 25, 2026 11:19
@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds agent-readable contracts and configurable output keys to the bandwidth, SQUIM, and WER metric stages.

  • Adds file, waveform, and automatic input residency to bandwidth and SQUIM.
  • Reuses resident waveforms with their sample rates instead of reopening audio files.
  • Declares conditional top-level and per-segment metric writes for pipeline planning.
  • Adds tests for waveform residency, validation behavior, and zero-length SQUIM segments.

Confidence Score: 5/5

The PR appears safe to merge after its explicitly declared agent-foundation dependency lands.

No independently actionable defect remains beyond the import failure already documented as an expected dependency-order constraint.

Important Files Changed

Filename Overview
nemo_curator/stages/audio/metrics/bandwidth.py Adds agent contracts, configurable data keys, and file-or-waveform audio resolution while preserving segment-level skip handling.
nemo_curator/stages/audio/metrics/squim.py Adds batch-only agent metadata, configurable metric output, and resident-waveform support for whole-record and segment scoring.
nemo_curator/stages/audio/metrics/wer.py Adds agent contracts and consistently applies the configurable metrics key across top-level and segment-level WER output.
tests/stages/audio/metrics/test_metrics.py Covers bandwidth waveform parity, residency validation, SQUIM residency declarations, and zero-length segment handling.

Reviews (1): Last reviewed commit: "feat(audio-metrics): make metric stages ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant