nemo_rl.data.datasets.response_datasets.audiomcq#

Module Contents#

Classes#

AudioMCQDataset

Wrapper around the Harland/AudioMCQ-StrongAC-GeminiCoT dataset.

Functions#

Data#

API#

nemo_rl.data.datasets.response_datasets.audiomcq.DEFAULT_TEMPLATE#

‘{question} Please choose the answer from the following options: {choices}. Output the final answer i…’

nemo_rl.data.datasets.response_datasets.audiomcq.AUDIOMCQ_REPO_ID#

‘Harland/AudioMCQ-StrongAC-GeminiCoT’

nemo_rl.data.datasets.response_datasets.audiomcq.AUDIOMCQ_MANIFEST#

‘data.jsonl’

nemo_rl.data.datasets.response_datasets.audiomcq.TARGET_SAMPLE_RATE#

16000

nemo_rl.data.datasets.response_datasets.audiomcq.STRONG_AC_VALUE#

‘strong’

nemo_rl.data.datasets.response_datasets.audiomcq._resample_audio(
audio_array: numpy.ndarray,
orig_sr: int,
target_sr: int = TARGET_SAMPLE_RATE,
) numpy.ndarray#
nemo_rl.data.datasets.response_datasets.audiomcq._resolve_snapshot_root() str#
class nemo_rl.data.datasets.response_datasets.audiomcq.AudioMCQDataset(
split: str = 'train',
split_validation_size: float | int = 0,
seed: int = 42,
max_samples: int | None = None,
**kwargs,
)#

Bases: nemo_rl.data.datasets.raw_dataset.RawDataset

Wrapper around the Harland/AudioMCQ-StrongAC-GeminiCoT dataset.

The upstream dataset is already filtered to the StrongAC subset of AudioMCQ and additionally restricted to samples whose Gemini chain-of-thought annotations passed quality review. Each row contains a relative audio_path pointing to a .wav or .mp3 file shipped inline in the dataset snapshot, plus a four-item choices list and a free-text answer.

Initialization

Construct the wrapper.

The upstream manifest only ships a native train split, so the validation slice is synthesized from it through split_train_validation — the same train-and-validate-from-train convention used by AVQADataset. Set split_validation_size > 0 on the data.train entry and the held-out slice is exposed via self.val_dataset for setup_response_data to pick up; no separate data.validation entry is needed.

Parameters:
  • split"train" or "validation". Kept for config compatibility; both read the same train manifest.

  • split_validation_size – Fraction (float) or absolute count (int) of rows held out for validation.

  • seed – Shuffle and split seed.

  • max_samples – Optional cap, applied after the defensive audio-contribution filter and the deterministic shuffle.

task_name#

‘audiomcq’

_eager_audio_probe(ds: datasets.Dataset) None#

Verify the first row’s audio file exists under the snapshot root.

Catches missing audio archives at construction time so doomed runs do not boot Ray actors, vLLM, and Megatron before failing.

format_data(data: dict[str, Any]) dict[str, Any]#