nemo_rl.data.datasets.response_datasets.audiomcq#
Module Contents#
Classes#
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,
- 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.RawDatasetWrapper 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_pathpointing to a.wavor.mp3file shipped inline in the dataset snapshot, plus a four-itemchoiceslist and a free-textanswer.Initialization
Construct the wrapper.
The upstream manifest only ships a native
trainsplit, so the validation slice is synthesized from it throughsplit_train_validation— the same train-and-validate-from-train convention used byAVQADataset. Setsplit_validation_size > 0on thedata.trainentry and the held-out slice is exposed viaself.val_datasetforsetup_response_datato pick up; no separatedata.validationentry 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-contributionfilter 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]#