Skip to content

[6667815] Sync LibriSpeech-PC smoke audio metadata - #3098

Merged
bxyu-nvidia merged 1 commit into
NVIDIA-NeMo:mainfrom
gwarmstrong:fix/asr-smoke-audio-sidechannel
Sep 4, 2026
Merged

bxyu-nvidia merged 1 commit into
NVIDIA-NeMo:mainfrom
gwarmstrong:fix/asr-smoke-audio-sidechannel

Conversation

@gwarmstrong

@gwarmstrong gwarmstrong commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rename the bundled ASR smoke data metadata key from audio_url to audio_data, matching the vllm_model contract introduced in Add file-path audio support to the vllm_model audio sidechannel #1170.
  • Update the generator and all checked-in rollout fixtures.
  • Add a regression test that compares the committed dataset with generator output and validates each WAV data URI.

Problem

The production LibriSpeech-PC preparation script emits metadata.audio_data, but the five-row smoke dataset and its generator still emitted metadata.audio_url. The current vllm_model adapter does not consume that legacy metadata key. It forwarded the 42 KB data URI as ordinary request metadata, which OpenAI rejected because metadata strings are limited to 512 characters.

The reported command also selected the vllm_model Gym adapter while leaving policy_base_url pointed at https://api.openai.com/v1. This adapter emits the vLLM audio_url content format. It requires a compatible audio-capable vLLM endpoint.

Reproduction before this change

gym env start \
    --model-type vllm_model \
    --resources-server asr_with_pc

gym eval run --no-serve \
    --agent asr_with_pc_simple_agent \
    --input resources_servers/asr_with_pc/data/example.jsonl \
    --output results/asr_with_pc_rollouts.jsonl \
    --num-repeats 1

When policy_base_url is the OpenAI API, the request fails with:

Invalid metadata.audio_url: string too long. Expected a string with maximum length 512, but got a string with length 42750 instead.

Live vLLM reproduction

Install vLLM with its audio extra in the serving environment. Start the model in one terminal:

vllm serve Qwen/Qwen2-Audio-7B-Instruct \
    --host 127.0.0.1 \
    --port 10240 \
    --dtype bfloat16 \
    --max-model-len 8192 \
    --limit-mm-per-prompt '{"audio": 1}'

Start Gym in another terminal:

gym env start \
    --model-type vllm_model \
    --model-url http://127.0.0.1:10240/v1 \
    --model Qwen/Qwen2-Audio-7B-Instruct \
    --model-api-key dummy_key \
    --resources-server asr_with_pc

Then run the five-row smoke test:

gym eval run --no-serve \
    --agent asr_with_pc_simple_agent \
    --input resources_servers/asr_with_pc/data/example.jsonl \
    --output results/asr_with_pc_rollouts.jsonl \
    --num-repeats 1

The local Blackwell test host also used VLLM_USE_FLASHINFER_SAMPLER=0 and --enforce-eager because it did not have nvcc. Those host-specific startup options are not part of the benchmark contract.

Testing

  • Live smoke with vLLM 0.25.1 and Qwen/Qwen2-Audio-7B-Instruct: 5 of 5 rollouts completed and all five upstream Chat Completions calls returned HTTP 200.
  • RAY_TMPDIR=/tmp uv run gym env test --resources-server asr_with_pc (47 passed)
  • uv run pytest responses_api_models/vllm_model/tests/test_app.py -k AudioDataSplice -x (6 passed)
  • pre-commit run --all-files in a clean checkout
  • Parsed all changed JSONL files with jq
  • Confirmed each JSONL differs only by the metadata key rename

@copy-pr-bot

copy-pr-bot Bot commented Sep 4, 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.

@gwarmstrong

Copy link
Copy Markdown
Contributor Author

/claude review

@gwarmstrong

Copy link
Copy Markdown
Contributor Author

/ok to test 4beda20

@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

SHIP — LGTM, no reliability concerns.

Focused fix: renames the audio sidechannel metadata field audio_url → audio_data in asr_with_pc example data / generator / docs to match the vllm_model adapter, which reads audio_data/audio_path/audio_paths and no longer honors audio_url (responses_api_models/vllm_model/app.py:657-682). Pre-rename, the example rows carried the stale key that the adapter silently drops, so no audio was spliced — this restores it.

Verified:

  • All four data/*.jsonl consistently use audio_data; zero residual audio_url keys.
  • Generator swapped numpy/soundfile for stdlib wave; no leftover np./sf. refs. app.py still uses numpy legitimately (unchanged).
  • New test test_example_data_matches_generator_and_uses_vllm_audio_data_sidechannel asserts committed data == regenerated output and checks the base64 WAV RIFF/data:audio/wav;base64, shape — asserts real behavior. Note the WAV bytes from stdlib wave differ from soundfile's, so this test only passes if example.jsonl was regenerated; CI will catch it if not.
  • All benchmark prepare.py scripts remain consistent with the adapter contract.

No verifier/scorer/async surface touched.

@bxyu-nvidia
bxyu-nvidia merged commit f547f77 into NVIDIA-NeMo:main Sep 4, 2026
32 checks passed
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
## Summary

- Rename the bundled ASR smoke data metadata key from `audio_url` to
`audio_data`, matching the `vllm_model` contract introduced in #1170.
- Update the generator and all checked-in rollout fixtures.
- Clarify that `--model-type vllm_model` selects the Gym adapter and
still requires `--model-url` to point to an audio-capable vLLM endpoint.
- Add a regression test that compares the committed dataset with
generator output and validates each WAV data URI.

## Problem

The production LibriSpeech-PC preparation script emits
`metadata.audio_data`, but the five-row smoke dataset and its generator
still emitted `metadata.audio_url`. The current `vllm_model` adapter
does not consume that legacy metadata key. It forwarded the 42 KB data
URI as ordinary request metadata, which OpenAI rejected because metadata
strings are limited to 512 characters.

The reported command also selected the `vllm_model` Gym adapter while
leaving `policy_base_url` pointed at `https://api.openai.com/v1`. This
adapter emits the vLLM `audio_url` content format. It requires a
compatible audio-capable vLLM endpoint.

## Reproduction before this change

```bash
gym env start \
    --model-type vllm_model \
    --resources-server asr_with_pc

gym eval run --no-serve \
    --agent asr_with_pc_simple_agent \
    --input resources_servers/asr_with_pc/data/example.jsonl \
    --output results/asr_with_pc_rollouts.jsonl \
    --num-repeats 1
```

When `policy_base_url` is the OpenAI API, the request fails with:

```text
Invalid metadata.audio_url: string too long. Expected a string with maximum length 512, but got a string with length 42750 instead.
```

## Correct server command

```bash
gym env start \
    --model-type vllm_model \
    --model-url http://<vllm-host>:<port>/v1 \
    --model <audio-capable-model> \
    --resources-server asr_with_pc
```

## Testing

- `RAY_TMPDIR=/tmp uv run gym env test --resources-server asr_with_pc`
(`47 passed`)
- `uv run pytest responses_api_models/vllm_model/tests/test_app.py -k
AudioDataSplice -x` (`6 passed`)
- `pre-commit run --all-files` in a clean checkout
- Parsed all changed JSONL files with `jq`
- Confirmed each JSONL differs only by the metadata key rename

A live rollout was not run because no audio-capable vLLM endpoint is
available in this workspace.

Signed-off-by: gwarmstrong <[email protected]>
Co-authored-by: gwarmstrong <[email protected]>
Signed-off-by: Junkeun Yi <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 4beda209 Deployed Sep 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #2588
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.

2 participants