-
Notifications
You must be signed in to change notification settings - Fork 320
Add ray data for audio modality #1592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a90a3af
ffd2b81
0b82235
235ef99
da6bf1e
c6a9d35
3b4cb6c
bd25cbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -580,15 +580,15 @@ entries: | |
| - metric: throughput_images_per_sec | ||
| min_value: 3.0 | ||
|
|
||
| - name: audio_fleurs | ||
| - name: audio_fleurs_xenna | ||
| enabled: true | ||
| script: audio_fleurs_benchmark.py | ||
| args: >- | ||
| --benchmark-results-path={session_entry_dir} | ||
| --scratch-output-path={session_entry_dir}/scratch | ||
| --model-name=nvidia/stt_hy_fastconformer_hybrid_large_pc | ||
| --lang=hy_am | ||
| --split=dev | ||
| --split=train | ||
| --wer-threshold=5.5 | ||
| --gpus=1 | ||
| ray: | ||
|
|
@@ -600,6 +600,27 @@ entries: | |
| ping_on_failure: | ||
| - U03C41SNADV # Aaftab V | ||
|
|
||
| - name: audio_fleurs_raydata | ||
| enabled: true | ||
| script: audio_fleurs_benchmark.py | ||
| args: >- | ||
| --benchmark-results-path={session_entry_dir} | ||
| --scratch-output-path={session_entry_dir}/scratch | ||
| --model-name=nvidia/stt_hy_fastconformer_hybrid_large_pc | ||
| --lang=hy_am | ||
| --split=train | ||
| --wer-threshold=5.5 | ||
| --gpus=1 | ||
| --executor=ray_data | ||
| ray: | ||
| num_cpus: 64 | ||
| num_gpus: 4 | ||
| enable_object_spilling: false | ||
| sink_data: | ||
| - name: slack | ||
| ping_on_failure: | ||
| - U03C41SNADV # Aaftab V | ||
|
Comment on lines
+603
to
+622
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing Neither requirements:
- metric: is_success
exact_value: true
- metric: total_builder_windows
min_value: 1
- metric: total_filtered_windows
min_value: 1Without Consider adding at minimum an |
||
|
|
||
| - name: arxiv_e2e_pipeline_raydata | ||
| enabled: true | ||
| script: arxiv_e2e_pipeline_benchmark.py | ||
|
|
@@ -888,3 +909,35 @@ entries: | |
| min_value: 1 | ||
| - metric: total_filtered_windows | ||
| min_value: 1 | ||
|
|
||
| - name: alm_pipeline_ray_data | ||
| enabled: true | ||
| script: alm_pipeline_benchmark.py | ||
| args: >- | ||
| --benchmark-results-path={session_entry_dir} | ||
| --input-manifest={curator_repo_dir}/tests/fixtures/audio/alm/sample_input.jsonl | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To run alm benchmark on large scale real world data, below are the following steps:
Same instructions for both xenna and ray. |
||
| --executor=ray_data | ||
| --target-window-duration=120.0 | ||
| --tolerance=0.1 | ||
| --min-sample-rate=16000 | ||
| --min-bandwidth=8000 | ||
| --min-speakers=2 | ||
| --max-speakers=5 | ||
| --overlap-percentage=50 | ||
| --repeat-factor=2000 | ||
| timeout_s: 600 | ||
| sink_data: | ||
| - name: slack | ||
| ping_on_failure: | ||
| - U03C41SNADV # Aaftab V | ||
| ray: | ||
| num_cpus: 8 | ||
| num_gpus: 0 | ||
| enable_object_spilling: false | ||
| requirements: | ||
| - metric: is_success | ||
| exact_value: true | ||
| - metric: total_builder_windows | ||
| min_value: 1 | ||
| - metric: total_filtered_windows | ||
| min_value: 1 | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,10 +15,11 @@ | |||||||||||||||||||
| """Audio Fleurs benchmarking script. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| This script runs audio Fleurs benchmarks with comprehensive metrics collection | ||||||||||||||||||||
| using XennaExecutor and logs results to configured sinks. | ||||||||||||||||||||
| and logs results to configured sinks. | ||||||||||||||||||||
| """ | ||||||||||||||||||||
|
|
||||||||||||||||||||
| import argparse | ||||||||||||||||||||
| import traceback | ||||||||||||||||||||
| from pathlib import Path | ||||||||||||||||||||
| from typing import Any | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
|
@@ -59,6 +60,7 @@ def run_audio_fleurs_benchmark( # noqa: PLR0913 | |||||||||||||||||||
| raise ValueError(msg) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| logger.info("Starting audio fleurs benchmark") | ||||||||||||||||||||
| logger.info(f"Executor: {executor}") | ||||||||||||||||||||
| logger.info(f"Model: {model_name}") | ||||||||||||||||||||
| logger.info(f"Language: {lang}") | ||||||||||||||||||||
| logger.info(f"Split: {split}") | ||||||||||||||||||||
|
|
@@ -147,6 +149,10 @@ def main() -> int: | |||||||||||||||||||
| try: | ||||||||||||||||||||
| result_dict.update(run_audio_fleurs_benchmark(**vars(args))) | ||||||||||||||||||||
| success_code = 0 if result_dict["metrics"]["is_success"] else 1 | ||||||||||||||||||||
| except Exception as e: | ||||||||||||||||||||
| error_traceback = traceback.format_exc() | ||||||||||||||||||||
| logger.error(f"Benchmark failed: {e}") | ||||||||||||||||||||
| logger.debug(f"Full traceback:\n{error_traceback}") | ||||||||||||||||||||
|
Comment on lines
+152
to
+155
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exception swallowed, Inside the Consider either re-raising the exception after logging, or documenting that exceptions are intentionally swallowed here:
Suggested change
|
||||||||||||||||||||
| finally: | ||||||||||||||||||||
| write_benchmark_results(result_dict, args.benchmark_results_path) | ||||||||||||||||||||
| return success_code | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,9 @@ | |
|
|
||
| import os | ||
| from dataclasses import dataclass | ||
| from typing import Any | ||
|
|
||
| from nemo_curator.backends.experimental.utils import RayStageSpecKeys | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Module-level Ray import still present
Concretely, def ray_stage_spec(self) -> dict[str, Any]:
from nemo_curator.backends.experimental.utils import RayStageSpecKeys
return {RayStageSpecKeys.IS_FANOUT_STAGE: True}Then remove the module-level |
||
| from nemo_curator.stages.audio.datasets.file_utils import download_file, extract_archive | ||
| from nemo_curator.stages.base import ProcessingStage | ||
| from nemo_curator.tasks import AudioBatch, _EmptyTask | ||
|
|
@@ -138,6 +140,9 @@ def download_extract_files(self, dst_folder: str) -> None: | |
|
|
||
| extract_archive(f"{dst_folder}/{self.split}.tar.gz", str(dst_folder), force_extract=True) | ||
|
|
||
| def ray_stage_spec(self) -> dict[str, Any]: | ||
| return {RayStageSpecKeys.IS_FANOUT_STAGE: True} | ||
|
oyilmaz-nvidia marked this conversation as resolved.
|
||
|
|
||
| def process(self, _: _EmptyTask) -> list[AudioBatch]: | ||
| self.download_extract_files(self.raw_data_dir) | ||
| return self.process_transcript(os.path.join(self.raw_data_dir, self.split + ".tsv")) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No
timeout_sfor train-split benchmarksBoth
audio_fleurs_raydata(new) andaudio_fleurs_xenna(changed fromdev→train) now process the full Armenian FLEURS training split, which is considerably larger thandev. Without atimeout_s, a slow download, a hung Ray worker, or unexpectedly slow ASR inference could cause these entries to block the entire nightly run indefinitely.The
alm_pipeline_ray_dataentry added in this same PR does includetimeout_s: 600for reference. Consider adding a generous but bounded timeout to both audio-fleurs entries, e.g.:and similarly for
audio_fleurs_xenna.