From 0d90010ec292539f8193a6bf5560c63583df391a Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Tue, 7 Jul 2026 16:53:19 -0500 Subject: [PATCH 01/17] chore: replace decord2 with torchvision/torchaudio for media loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit decord2 bundles libx264, libx265, libopenh264, and libmp3lame as hard dynamic dependencies of its core shared library. These codec libs carry MPEG LA / HEVC Advance royalty obligations on distribution. Replace the two decord usages in multimodal_utils.py: - Video loading: load_video backend="decord" → backend="torchvision" (torchvision==0.26.0 is already a project dependency) - Audio fallback: decord.AudioReader → torchaudio.load + functional.resample (torchaudio==2.11.0 is already a project dependency) Remove decord2 from pyproject.toml dependencies. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- nemo_rl/data/multimodal_utils.py | 26 +++++++++++++------------- nemo_rl/data_plane/codec.py | 2 +- pyproject.toml | 2 -- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/nemo_rl/data/multimodal_utils.py b/nemo_rl/data/multimodal_utils.py index 6a16e18fec..bcea192a44 100644 --- a/nemo_rl/data/multimodal_utils.py +++ b/nemo_rl/data/multimodal_utils.py @@ -20,7 +20,6 @@ from io import BytesIO from typing import Any, Optional, Union -import decord import requests import torch from PIL import Image @@ -357,17 +356,19 @@ def load_media_from_message( load_audio(aud, **multimodal_load_kwargs["audio"]) ) except (RuntimeError, FileNotFoundError, OSError) as e: - logger.warning("Audio loading failed. Fall back to decord.") - # use decord - loaded_audio = decord.AudioReader( - aud, - sample_rate=multimodal_load_kwargs["audio"]["sampling_rate"], - mono=True, - ) + logger.warning("Audio loading failed. Falling back to torchaudio.") + import torchaudio + + waveform, sr = torchaudio.load(aud) + target_sr = multimodal_load_kwargs["audio"]["sampling_rate"] + if sr != target_sr: + waveform = torchaudio.functional.resample( + waveform, sr, target_sr + ) + if waveform.shape[0] > 1: + waveform = waveform.mean(0, keepdim=True) loaded_media["audio"].append( - loaded_audio[:].asnumpy()[ - get_dim_to_pack_along(processor, "audio") - ] + waveform.numpy()[get_dim_to_pack_along(processor, "audio")] ) else: loaded_media["audio"].append(aud) @@ -379,9 +380,8 @@ def load_media_from_message( if "video" in multimodal_load_kwargs else {} ) - # seems decord backend loads video faster with multithread ffmpeg and it is easier to install loaded_media["video"].append( - load_video(vid, backend="decord", **load_video_kwargs)[0] + load_video(vid, backend="torchvision", **load_video_kwargs)[0] ) else: loaded_media["video"].append(vid) diff --git a/nemo_rl/data_plane/codec.py b/nemo_rl/data_plane/codec.py index fb62568725..01e9459c6a 100644 --- a/nemo_rl/data_plane/codec.py +++ b/nemo_rl/data_plane/codec.py @@ -293,7 +293,7 @@ def materialize( The lazy ``BatchedDataDict`` import keeps ``import nemo_rl.data_plane`` cheap for unit tests that don't actually call this function (``BatchedDataDict`` transitively - pulls multimodal deps like decord / torchvision). + pulls multimodal deps like torchvision / torchaudio). Args: td: Wire TensorDict to materialize. diff --git a/pyproject.toml b/pyproject.toml index c3f356fd8a..52cae62a62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,6 @@ dependencies = [ "nvidia-nvshmem-cu13; sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'aarch64')", # for deep_ep build "swanlab", "pyzmq", - "decord2", "soundfile>=0.13.1", "nccl4py; sys_platform != 'darwin'", # for non-colocated refit "cuda-bindings; sys_platform != 'darwin'", # for non-colocated refit @@ -480,7 +479,6 @@ requires-dist = [ "build", "compressed-tensors", "cuda-python==13.0", - "decord2", "datasets", "einops", "fastapi", From aff511d3b6dc159ee35b2f2f177a933a97f3b5ed Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Tue, 7 Jul 2026 16:59:43 -0500 Subject: [PATCH 02/17] chore: update uv.lock to remove decord2 Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- uv.lock | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/uv.lock b/uv.lock index e6e30e2296..3f807a5913 100644 --- a/uv.lock +++ b/uv.lock @@ -191,7 +191,7 @@ requires-dist = ["setuptools", "wheel", "torch", "numpy"] [[manifest.dependency-metadata]] name = "sglang" version = "0.5.10" -requires-dist = ["ipython", "aiohttp", "apache-tvm-ffi>=0.1.5,<0.2", "anthropic>=0.20.0", "blobfile==3.0.0", "build", "compressed-tensors", "cuda-python==13.0", "decord2", "datasets", "einops", "fastapi", "flashinfer-python==0.6.7.post2", "flashinfer-cubin==0.6.7.post2", "gguf", "interegular", "llguidance>=0.7.11,<0.8.0", "modelscope", "msgspec", "ninja", "numpy", "nvidia-cutlass-dsl>=4.4.1", "nvidia-ml-py", "openai-harmony==0.0.4", "openai==2.6.1", "orjson", "outlines==0.1.11", "packaging", "partial-json-parser", "pillow", "prometheus-client>=0.20.0", "psutil", "py-spy", "pybase64", "pydantic", "python-multipart", "pyzmq>=25.1.2", "quack-kernels>=0.3.0", "requests", "scipy", "sentencepiece", "setproctitle", "flash-attn-4>=4.0.0b4", "sglang-kernel==0.4.1", "soundfile==0.13.1", "tiktoken", "timm==1.0.16", "torch-memory-saver==0.0.9", "torch==2.9.1", "torchao==0.9.0", "torchaudio==2.9.1", "torchcodec==0.9.1 ; (platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l') or sys_platform != 'linux'", "torchvision", "tqdm", "mistral-common>=1.9.0", "transformers==5.3.0", "uvicorn", "uvloop", "watchfiles", "xgrammar==0.1.32", "smg-grpc-servicer>=0.5.0"] +requires-dist = ["ipython", "aiohttp", "apache-tvm-ffi>=0.1.5,<0.2", "anthropic>=0.20.0", "blobfile==3.0.0", "build", "compressed-tensors", "cuda-python==13.0", "datasets", "einops", "fastapi", "flashinfer-python==0.6.7.post2", "flashinfer-cubin==0.6.7.post2", "gguf", "interegular", "llguidance>=0.7.11,<0.8.0", "modelscope", "msgspec", "ninja", "numpy", "nvidia-cutlass-dsl>=4.4.1", "nvidia-ml-py", "openai-harmony==0.0.4", "openai==2.6.1", "orjson", "outlines==0.1.11", "packaging", "partial-json-parser", "pillow", "prometheus-client>=0.20.0", "psutil", "py-spy", "pybase64", "pydantic", "python-multipart", "pyzmq>=25.1.2", "quack-kernels>=0.3.0", "requests", "scipy", "sentencepiece", "setproctitle", "flash-attn-4>=4.0.0b4", "sglang-kernel==0.4.1", "soundfile==0.13.1", "tiktoken", "timm==1.0.16", "torch-memory-saver==0.0.9", "torch==2.9.1", "torchao==0.9.0", "torchaudio==2.9.1", "torchcodec==0.9.1 ; (platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l') or sys_platform != 'linux'", "torchvision", "tqdm", "mistral-common>=1.9.0", "transformers==5.3.0", "uvicorn", "uvloop", "watchfiles", "xgrammar==0.1.32", "smg-grpc-servicer>=0.5.0"] [[manifest.dependency-metadata]] name = "sglang-kernel" @@ -1152,22 +1152,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a", size = 9190, upload-time = "2025-02-24T04:41:32.565Z" }, ] -[[package]] -name = "decord2" -version = "3.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -wheels = [ - { url = "https://files.pythonhosted.org/packages/a2/fb/2d2f27f9fc88b664b3713ed44ef2b8240964903c99def4951d327daeba87/decord2-3.3.0-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:59e85f8436fc73743057e23b30321afb34818bb82d7c4cec7347f60fb9de2d21", size = 17311167, upload-time = "2026-04-06T18:09:51.709Z" }, - { url = "https://files.pythonhosted.org/packages/e8/37/947bc17d6a16f5c678ab2c6ba3330b20f617ec7652f103051881cf1d98d9/decord2-3.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:deadd17cc00b65545ef731fb5f58e05d625dc8db5fbda25edc9bd30469343413", size = 25036754, upload-time = "2026-04-06T18:09:54.204Z" }, - { url = "https://files.pythonhosted.org/packages/61/ab/ff85679c25708844a5e1f30e8243dfdb40985b9ce04496dde84a698f4eee/decord2-3.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e8d5408963552843411f2d74aac8025d0bb99c975c48b80e36c989297cf2d145", size = 27392918, upload-time = "2026-04-06T18:09:57.154Z" }, - { url = "https://files.pythonhosted.org/packages/d3/b7/4bc9512474269eda8527d358040ab8a608fe001ab8147c8b238ad4841cc4/decord2-3.3.0-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:c633a703be369a8bb919f7586f5a39398a7ed7019a8f8ae3931fdff2b87d6a2f", size = 17311166, upload-time = "2026-04-06T18:10:00.088Z" }, - { url = "https://files.pythonhosted.org/packages/fe/28/7d116e141a4ec1a3a7ba3ddb7f5e5e7811a23de5468818501ec640a2995b/decord2-3.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:6c7e50d5e3b3471672641cb296bb2616348638e9ce22ecd17bfadc0897907baf", size = 25036756, upload-time = "2026-04-06T18:10:02.647Z" }, - { url = "https://files.pythonhosted.org/packages/5e/4c/5cb20dcbb7b62d9453b8d1b18a62f02f8005b402747bbc1d7408bf5a57ce/decord2-3.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:3d87266f9a4d211a03e2ce23d64a92e84edbc4364bf36356db47031f9f2ce45e", size = 27392917, upload-time = "2026-04-06T18:10:05.232Z" }, -] - [[package]] name = "deep-ep" version = "1.2.1+bfded34" @@ -3825,7 +3809,6 @@ dependencies = [ { name = "cuda-bindings", marker = "sys_platform != 'darwin' or (extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "datasets" }, { name = "debugpy" }, - { name = "decord2" }, { name = "hydra-core" }, { name = "math-verify" }, { name = "matplotlib" }, @@ -3977,7 +3960,6 @@ requires-dist = [ { name = "cuda-python", marker = "extra == 'vllm'" }, { name = "datasets", specifier = ">=4.0.0" }, { name = "debugpy" }, - { name = "decord2" }, { name = "deep-ep", marker = "platform_machine == 'aarch64' and extra == 'automodel'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=a48493600c4886c1b297aaa78db0e1ebc2d8dd6c" }, { name = "deep-ep", marker = "platform_machine == 'aarch64' and extra == 'mcore'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=a48493600c4886c1b297aaa78db0e1ebc2d8dd6c" }, { name = "deep-ep", marker = "platform_machine == 'aarch64' and extra == 'vllm'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=a48493600c4886c1b297aaa78db0e1ebc2d8dd6c" }, @@ -6315,7 +6297,6 @@ dependencies = [ { name = "compressed-tensors" }, { name = "cuda-python" }, { name = "datasets" }, - { name = "decord2" }, { name = "einops" }, { name = "fastapi" }, { name = "flash-attn-4" }, From 029b9eeb138f7ae7e14c37fd1afddb636498e5c3 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Thu, 9 Jul 2026 09:47:54 -0500 Subject: [PATCH 03/17] fix: replace decord in datasets/utils.py and add torchaudio to pyrefly - Replace decord.AudioReader in load_audio_from_file with torchaudio - Add torchaudio.* to pyrefly replace-imports-with-any to suppress import-error for the lazy torchaudio import in multimodal_utils.py Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- nemo_rl/data/datasets/utils.py | 22 +++++++++------------- pyrefly.toml | 1 + 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/nemo_rl/data/datasets/utils.py b/nemo_rl/data/datasets/utils.py index d7842ab8b1..3efbb9662d 100644 --- a/nemo_rl/data/datasets/utils.py +++ b/nemo_rl/data/datasets/utils.py @@ -37,19 +37,15 @@ def load_audio_from_file(path: str, sampling_rate: int = 16000) -> np.ndarray: - """Decode an audio file (or the audio track of a video) as a 1-D float32 array. - - Uses decord's ``AudioReader`` (already a project dependency for video - decoding) to produce a mono waveform at the requested sampling rate. - """ - import decord - - reader = decord.AudioReader(path, sample_rate=sampling_rate, mono=True) - # Shape: (channels, T). With mono=True channels=1; squeeze to (T,). - audio = reader[:].asnumpy() - if audio.ndim > 1: - audio = audio[0] - return audio.astype(np.float32) + """Decode an audio file (or the audio track of a video) as a 1-D float32 array.""" + import torchaudio + + waveform, sr = torchaudio.load(path) + if sr != sampling_rate: + waveform = torchaudio.functional.resample(waveform, sr, sampling_rate) + if waveform.shape[0] > 1: + waveform = waveform.mean(0, keepdim=True) + return waveform.squeeze(0).numpy().astype(np.float32) def assert_no_double_bos(token_ids: torch.Tensor, tokenizer: TokenizerType) -> None: diff --git a/pyrefly.toml b/pyrefly.toml index 5842310100..576e890d1b 100644 --- a/pyrefly.toml +++ b/pyrefly.toml @@ -10,6 +10,7 @@ replace-imports-with-any = [ "math_verify.*", "sympy.*", "torchdata.*", + "torchaudio.*", "nemo.*", "megatron.*", "ray.*", From 7bc9016c212d129217f67a740b64c9d4b49161df Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Thu, 9 Jul 2026 10:14:49 -0500 Subject: [PATCH 04/17] chore: exclude av (PyAV) from container via uv override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit av bundles libx264, libx265, libopenh264, and libmp3lame — the same royalty-obligating codec libs we removed with decord2. It is pulled in transitively by qwen-vl-utils (a megatron-bridge dep) but is only actually needed by megatron-bridge's optional WAN diffusion path, which installs it at test time via scripts/install_diffusion_deps.sh. Add "av; sys_platform == 'never'" to override-dependencies, mirroring the same approach already taken in Megatron-Bridge's own pyproject.toml (commit f4b34b4). Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- pyproject.toml | 4 ++++ uv.lock | 15 +-------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 76e546c290..13b77e2f3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -377,6 +377,10 @@ override-dependencies = [ # extra composes with mcore/automodel without version-mirroring TQ's # requirements.txt. Forward-compatible across TQ minor bumps. "numpy>=2.1.0", + # av (PyAV) carries CVE-bundled codec libs (libx264, libx265, libopenh264, libmp3lame). + # It is only needed by megatron-bridge's optional WAN diffusion path, which installs it + # at test time via scripts/install_diffusion_deps.sh. Exclude from the shipped container. + "av; sys_platform == 'never'", ] # CVE fixes diff --git a/uv.lock b/uv.lock index 5e59e2be3f..f755b8ff0c 100644 --- a/uv.lock +++ b/uv.lock @@ -62,6 +62,7 @@ constraints = [ { name = "wheel", specifier = ">=0.46.2" }, ] overrides = [ + { name = "av", marker = "sys_platform == 'never'" }, { name = "deep-ep", marker = "platform_machine == 'aarch64'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=a48493600c4886c1b297aaa78db0e1ebc2d8dd6c" }, { name = "deep-ep", marker = "platform_machine == 'x86_64'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=29d31c095796f3c8ece47ee9cdcc167051bbeed9" }, { name = "langchain", specifier = ">=0.3.28" }, @@ -422,18 +423,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, ] -[[package]] -name = "av" -version = "18.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ae/a4/570a5a35c8638aba01e739925846c35fdd6b0756a15526766d0a4dd3b7df/av-18.0.0.tar.gz", hash = "sha256:4ef7e72c3d3a872584a1215173b16e0226811037f40dcdbf75992631098df1ba", size = 4340222, upload-time = "2026-07-02T06:37:58.907Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/84/74/6732f17b96dc23fd23b876b2805435855abdc8a3b397142be4e581165de8/av-18.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:4d683b7747a0ba9222b8a5f81e41db5f796e7f64473454ec4fe2548e083c2fa0", size = 33387843, upload-time = "2026-07-02T06:37:05.097Z" }, - { url = "https://files.pythonhosted.org/packages/6d/b9/7708c43fed7ae28b4a1bad060b4221e3334cd827cec24f7165902a6ac1f4/av-18.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ae56b40b6f8b067a8ad2dac664fbfbabac7f7a55b9a7bb031eb99289252bc017", size = 35536910, upload-time = "2026-07-02T06:37:08.806Z" }, - { url = "https://files.pythonhosted.org/packages/c9/cf/0d7aee07fe16aa9ffdf96043c14bed5485a52c0dea4259de87aa306ecab4/av-18.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef96dabb3e50dac249913145dff5424b302b257fd95dcb64be3c7b7a8aef16d1", size = 34451176, upload-time = "2026-07-02T06:37:15.154Z" }, - { url = "https://files.pythonhosted.org/packages/76/92/810da80b12680d4c4fe235bd1b4003289be9213ac7f114b77b8ecf0e3b3e/av-18.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:0f65518a184613e41536f29e8758c8e3d8293e46bf5bef108f04f925bbfa3f44", size = 36619869, upload-time = "2026-07-02T06:37:18.495Z" }, -] - [[package]] name = "babel" version = "2.18.0" @@ -5157,7 +5146,6 @@ name = "qwen-vl-utils" version = "0.0.14" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "av", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "packaging", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "pillow", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "requests", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, @@ -5476,7 +5464,6 @@ dependencies = [ { name = "aiohttp", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "anthropic", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "apache-tvm-ffi", version = "0.1.9", source = { registry = "https://pypi.org/simple" }, marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, - { name = "av", marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" }, { name = "blobfile", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "build", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "compressed-tensors", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, From a66a82ef97bde0bc72e3c7cf4c2c2c3b853fc951 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Thu, 9 Jul 2026 10:32:04 -0500 Subject: [PATCH 05/17] fix: replace remaining decord backend in processors.py; exclude decord2 via uv override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch processors.py video loading from backend="decord" to backend="torchvision" (missed in the initial decord→torchvision pass) - Add decord2 to override-dependencies with sys_platform=='never' so sglang's transitive pull of qwen-vl-utils[decord] on aarch64 Linux doesn't land it in the container Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- nemo_rl/data/processors.py | 2 +- pyproject.toml | 3 +++ uv.lock | 16 +--------------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/nemo_rl/data/processors.py b/nemo_rl/data/processors.py index 734ab6cf0e..95b1a825f1 100644 --- a/nemo_rl/data/processors.py +++ b/nemo_rl/data/processors.py @@ -538,7 +538,7 @@ def vlm_hf_data_processor( video_value = content["video"] if isinstance(video_value, str): video_value = load_video( - video_value, backend="decord", **load_video_kwargs + video_value, backend="torchvision", **load_video_kwargs )[0] # Replace path with loaded frames so apply_chat_template can consume it user_message["content"].append({"type": "video", "video": video_value}) diff --git a/pyproject.toml b/pyproject.toml index 13b77e2f3a..be8cb42be6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -381,6 +381,9 @@ override-dependencies = [ # It is only needed by megatron-bridge's optional WAN diffusion path, which installs it # at test time via scripts/install_diffusion_deps.sh. Exclude from the shipped container. "av; sys_platform == 'never'", + # decord2 is pulled transitively by sglang → qwen-vl-utils[decord] on aarch64 Linux. + # NeMo-RL no longer calls any decord API (replaced by torchvision/torchaudio). + "decord2; sys_platform == 'never'", ] # CVE fixes diff --git a/uv.lock b/uv.lock index f755b8ff0c..e01925b213 100644 --- a/uv.lock +++ b/uv.lock @@ -63,6 +63,7 @@ constraints = [ ] overrides = [ { name = "av", marker = "sys_platform == 'never'" }, + { name = "decord2", marker = "sys_platform == 'never'" }, { name = "deep-ep", marker = "platform_machine == 'aarch64'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=a48493600c4886c1b297aaa78db0e1ebc2d8dd6c" }, { name = "deep-ep", marker = "platform_machine == 'x86_64'", git = "https://github.com/deepseek-ai/DeepEP.git?rev=29d31c095796f3c8ece47ee9cdcc167051bbeed9" }, { name = "langchain", specifier = ">=0.3.28" }, @@ -928,20 +929,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a", size = 9190, upload-time = "2025-02-24T04:41:32.565Z" }, ] -[[package]] -name = "decord2" -version = "3.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy", marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" }, -] -wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/37/947bc17d6a16f5c678ab2c6ba3330b20f617ec7652f103051881cf1d98d9/decord2-3.3.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:deadd17cc00b65545ef731fb5f58e05d625dc8db5fbda25edc9bd30469343413", size = 25036754, upload-time = "2026-04-06T18:09:54.204Z" }, - { url = "https://files.pythonhosted.org/packages/61/ab/ff85679c25708844a5e1f30e8243dfdb40985b9ce04496dde84a698f4eee/decord2-3.3.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e8d5408963552843411f2d74aac8025d0bb99c975c48b80e36c989297cf2d145", size = 27392918, upload-time = "2026-04-06T18:09:57.154Z" }, - { url = "https://files.pythonhosted.org/packages/fe/28/7d116e141a4ec1a3a7ba3ddb7f5e5e7811a23de5468818501ec640a2995b/decord2-3.3.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:6c7e50d5e3b3471672641cb296bb2616348638e9ce22ecd17bfadc0897907baf", size = 25036756, upload-time = "2026-04-06T18:10:02.647Z" }, - { url = "https://files.pythonhosted.org/packages/5e/4c/5cb20dcbb7b62d9453b8d1b18a62f02f8005b402747bbc1d7408bf5a57ce/decord2-3.3.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:3d87266f9a4d211a03e2ce23d64a92e84edbc4364bf36356db47031f9f2ce45e", size = 27392917, upload-time = "2026-04-06T18:10:05.232Z" }, -] - [[package]] name = "deep-ep" version = "1.2.1+29d31c0" @@ -5469,7 +5456,6 @@ dependencies = [ { name = "compressed-tensors", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "cuda-python", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, - { name = "decord2", marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" }, { name = "easydict", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "einops", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, { name = "fastapi", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" }, From e52aac7508fbb8400958d67cf8a4465416f97d1c Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Fri, 10 Jul 2026 16:31:32 -0500 Subject: [PATCH 06/17] fix: add torchaudio to main project dependencies torchaudio was only in override-dependencies (which pins version but doesn't install the package). Moving it to [project.dependencies] alongside torchvision so it's actually installed in the container. Without this, load_audio_from_file raises ModuleNotFoundError on torchaudio. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- pyproject.toml | 2 +- uv.lock | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index be8cb42be6..b72123ca4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,6 +50,7 @@ dependencies = [ "sympy>=1.14.0", "pillow>=12.1.1", "torchvision==0.26.0", + "torchaudio==2.11.0", # Keep the base range broad enough while allowing backend extras to tighten as needed. # Floor raised to 5.5.0 for Gemma 4 support. "transformers>=5.5.0,<5.9.0", @@ -348,7 +349,6 @@ override-dependencies = [ "timm<=1.0.22", "nvidia-modelopt[torch]>=0.44.0a0", "torch==2.11.0", - "torchaudio==2.11.0", # sglang has conflicting llguidance versions than vllm, so enforcing vllm's version since it's newer "llguidance>=1.3.0,<1.4.0", # Override setuptools range in other dependencies to address CVE GHSA-58pv-8j8x-9vj2 diff --git a/uv.lock b/uv.lock index e01925b213..51eb70145b 100644 --- a/uv.lock +++ b/uv.lock @@ -86,8 +86,6 @@ overrides = [ { name = "timm", specifier = "<=1.0.22" }, { name = "torch", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torch", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, - { name = "torchaudio", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, - { name = "torchaudio", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, { name = "transformer-engine", extras = ["pytorch", "core-cu13"], git = "https://github.com/NVIDIA/TransformerEngine.git?rev=release_v2.15" }, { name = "xgrammar", specifier = "==0.1.33" }, ] @@ -3298,6 +3296,7 @@ dependencies = [ { name = "tilelang", version = "0.1.9", source = { registry = "https://pypi.org/simple" }, marker = "(platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-automodel') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra != 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (extra != 'extra-7-nemo-rl-automodel' and extra != 'extra-7-nemo-rl-fsdp' and extra != 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "timm", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torch", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, + { name = "torchaudio", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchdata", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchvision", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "transferqueue", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, @@ -3521,6 +3520,8 @@ requires-dist = [ { name = "timm" }, { name = "torch", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torch", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, + { name = "torchaudio", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, + { name = "torchaudio", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, { name = "torchdata" }, { name = "torchvision", marker = "sys_platform != 'darwin'", specifier = "==0.26.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torchvision", marker = "sys_platform == 'darwin'", specifier = "==0.26.0", index = "https://pypi.org/simple" }, From cd54863a6e208b50101672374d76af49dbc2f92e Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Sat, 11 Jul 2026 22:35:07 -0500 Subject: [PATCH 07/17] =?UTF-8?q?fix:=20add=20torchcodec=20to=20main=20dep?= =?UTF-8?q?s=20for=20torchaudio=20video=E2=86=92audio=20decoding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit torchaudio 2.11.0 defaults to torchcodec as its first audio backend. torchcodec's native .so files were already present in the container (via ray worker venvs) but the Python package wasn't in the main venv, causing ModuleNotFoundError when load_audio_from_file is called from the dataloader. torchcodec links against system FFmpeg (LGPL-only) rather than bundling its own copy, so it carries no royalty-bearing codec libs (no libx264/ libx265/libmp3lame). Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- pyproject.toml | 1 + uv.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b72123ca4e..ff3ffbfff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ dependencies = [ "pillow>=12.1.1", "torchvision==0.26.0", "torchaudio==2.11.0", + "torchcodec>=0.3.0", # Keep the base range broad enough while allowing backend extras to tighten as needed. # Floor raised to 5.5.0 for Gemma 4 support. "transformers>=5.5.0,<5.9.0", diff --git a/uv.lock b/uv.lock index 51eb70145b..8e44178169 100644 --- a/uv.lock +++ b/uv.lock @@ -3297,6 +3297,7 @@ dependencies = [ { name = "timm", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torch", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchaudio", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, + { name = "torchcodec", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchdata", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchvision", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "transferqueue", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, @@ -3522,6 +3523,7 @@ requires-dist = [ { name = "torch", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, { name = "torchaudio", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torchaudio", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, + { name = "torchcodec", specifier = ">=0.3.0" }, { name = "torchdata" }, { name = "torchvision", marker = "sys_platform != 'darwin'", specifier = "==0.26.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torchvision", marker = "sys_platform == 'darwin'", specifier = "==0.26.0", index = "https://pypi.org/simple" }, From 8dba7d22db65f4251067671ecb0ffb35b209941b Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Mon, 13 Jul 2026 14:47:11 -0500 Subject: [PATCH 08/17] feat: exclude torchaudio FFmpeg build from container; add audio install script - Remove torchaudio and torchcodec from [project.dependencies] and drop the pytorch-cu130 sources entry so the container receives only the PyPI torchaudio stub (~1.7 MB, no bundled FFmpeg) via sglang/vllm transitive deps. The pytorch-cu130 build (bundled FFmpeg with H.264/AAC decoders) is no longer shipped. - Add scripts/install_audio_deps.sh: installs torchaudio==2.11.0 (pytorch-cu130, with FFmpeg) + torchcodec at test time. Uses --reinstall-package torchaudio to upgrade from the PyPI stub. Check is idempotent (looks for bundled libav* in torchaudio/lib/, not just import success, so the PyPI stub does not falsely suppress the install). - Hook install_audio_deps.sh into all audio/omni test scripts (tests/test_suites/vlm/*omni*.sh, tests/functional/audio_grpo_megatron.sh, eval_audio.sh, eval_daily_omni.sh). LLM tests are unaffected. - Add prerequisite callout to docs/guides/grpo-audio.md. Signed-off-by: Kajal Jain --- docs/guides/grpo-audio.md | 10 +++++ pyproject.toml | 10 ++--- scripts/install_audio_deps.sh | 40 +++++++++++++++++++ tests/functional/audio_grpo_megatron.sh | 3 ++ tests/functional/eval_audio.sh | 3 ++ tests/functional/eval_daily_omni.sh | 3 ++ ...omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh | 1 + ...-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh | 1 + ...o-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh | 1 + ...en2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh | 1 + ...qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh | 1 + ...3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh | 1 + uv.lock | 17 +++----- 13 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 scripts/install_audio_deps.sh diff --git a/docs/guides/grpo-audio.md b/docs/guides/grpo-audio.md index 90e7abadfa..fd4dacbd90 100644 --- a/docs/guides/grpo-audio.md +++ b/docs/guides/grpo-audio.md @@ -1,5 +1,15 @@ # Audio Post-training with Nemo-RL +> **Audio dependencies are not pre-installed in the NeMo-RL container.** `torchaudio` and +> `torchcodec` bundle an FFmpeg build that includes H.264/AAC decoder implementations +> subject to patent licensing. Run the following script once before training or evaluation: +> +> ```bash +> bash scripts/install_audio_deps.sh +> ``` +> +> The script is a no-op if they are already installed. Audio tests run it automatically. + This guide explains how to use NeMo-RL to train [Qwen2.5-Omni](https://huggingface.co/Qwen) (3B or 7B) and [Qwen3-Omni-30B-A3B-Instruct](https://huggingface.co/Qwen/Qwen3-Omni-30B-A3B-Instruct) with GRPO on audio question-answering data, convert the resulting Megatron checkpoint to Hugging Face format, and evaluate it on the [MMAU benchmark](https://huggingface.co/datasets/TwinkStart/MMAU). NeMo-RL ships three recipes out of the box, but the pieces are independent and can be mixed: diff --git a/pyproject.toml b/pyproject.toml index ff3ffbfff6..ccdbce5753 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,8 +50,10 @@ dependencies = [ "sympy>=1.14.0", "pillow>=12.1.1", "torchvision==0.26.0", - "torchaudio==2.11.0", - "torchcodec>=0.3.0", + # torchaudio and torchcodec bundle an FFmpeg build that includes H.264/AAC + # decoder implementations subject to patent licensing (requires org3 approval + # to ship). They are NOT installed in the container image. Run + # scripts/install_audio_deps.sh before using audio features or audio tests. # Keep the base range broad enough while allowing backend extras to tighten as needed. # Floor raised to 5.5.0 for Gemma 4 support. "transformers>=5.5.0,<5.9.0", @@ -265,10 +267,6 @@ torchvision = [ { index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }, { index = "pypi", marker = "sys_platform == 'darwin'" }, ] -torchaudio = [ - { index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }, - { index = "pypi", marker = "sys_platform == 'darwin'" }, -] triton = [ { index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }, { index = "pypi", marker = "sys_platform == 'darwin'" }, diff --git a/scripts/install_audio_deps.sh b/scripts/install_audio_deps.sh new file mode 100644 index 0000000000..5977f66805 --- /dev/null +++ b/scripts/install_audio_deps.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# Install audio dependencies that are NOT shipped in the NeMo-RL container. +# +# torchaudio and torchcodec bundle an FFmpeg build containing H.264/AAC decoder +# implementations that are subject to patent licensing and require org3 approval +# to distribute. They are therefore excluded from the container image. +# +# Run this script before using audio features or running audio tests: +# +# bash scripts/install_audio_deps.sh +# +# Safe to call multiple times — exits immediately if already installed. +set -euo pipefail + +# The container already has the PyPI torchaudio stub (installed via sglang/vllm), +# but it does NOT bundle FFmpeg — audio decoding requires the pytorch-cu130 build. +# Check specifically for bundled FFmpeg libs (libavcodec.so.*) in torchaudio's lib dir. +HAS_FFMPEG=$(python -c " +import torchaudio, os +lib_dir = os.path.join(os.path.dirname(torchaudio.__file__), 'lib') +has = os.path.isdir(lib_dir) and any( + f.startswith(('libav', 'libswscale', 'libswresample')) + for f in (os.listdir(lib_dir) if os.path.isdir(lib_dir) else []) +) +print('yes' if has else 'no') +" 2>/dev/null || echo "no") + +if [[ "$HAS_FFMPEG" == "yes" ]]; then + echo "[audio-deps] torchaudio with bundled FFmpeg already installed, skipping." + exit 0 +fi + +echo "[audio-deps] Installing torchaudio==2.11.0 (pytorch-cu130, with FFmpeg) and torchcodec..." +uv pip install \ + --index-url https://download.pytorch.org/whl/cu130 \ + --extra-index-url https://pypi.org/simple \ + --reinstall-package torchaudio \ + "torchaudio==2.11.0" \ + "torchcodec>=0.3.0" +echo "[audio-deps] Done." diff --git a/tests/functional/audio_grpo_megatron.sh b/tests/functional/audio_grpo_megatron.sh index 2e52a7fa29..d5808eb2c5 100644 --- a/tests/functional/audio_grpo_megatron.sh +++ b/tests/functional/audio_grpo_megatron.sh @@ -7,6 +7,9 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail +# Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME LOG_DIR=$EXP_DIR/logs diff --git a/tests/functional/eval_audio.sh b/tests/functional/eval_audio.sh index 6bf8d2d98d..f069a8b281 100644 --- a/tests/functional/eval_audio.sh +++ b/tests/functional/eval_audio.sh @@ -7,6 +7,9 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail +# Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME LOG_DIR=$EXP_DIR/logs diff --git a/tests/functional/eval_daily_omni.sh b/tests/functional/eval_daily_omni.sh index 28979f2f86..b24fffe8eb 100755 --- a/tests/functional/eval_daily_omni.sh +++ b/tests/functional/eval_daily_omni.sh @@ -7,6 +7,9 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail +# Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME LOG_DIR=$EXP_DIR/logs diff --git a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh index 81c7e5624a..d237501849 100755 --- a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh index 318b6a9649..7815741e11 100755 --- a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=4 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh index 27badf7356..35dd2b3e95 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh index af93806af0..5d648cacdc 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh index 499d87dad4..3cb229e6f9 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh index 83ad35fb1e..c3f58b926e 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh @@ -1,6 +1,7 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=4 diff --git a/uv.lock b/uv.lock index 8e44178169..8257f236db 100644 --- a/uv.lock +++ b/uv.lock @@ -3296,8 +3296,6 @@ dependencies = [ { name = "tilelang", version = "0.1.9", source = { registry = "https://pypi.org/simple" }, marker = "(platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-automodel') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine == 'x86_64' and sys_platform == 'linux' and extra != 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (extra != 'extra-7-nemo-rl-automodel' and extra != 'extra-7-nemo-rl-fsdp' and extra != 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "timm", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torch", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, - { name = "torchaudio", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, - { name = "torchcodec", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchdata", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "torchvision", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, { name = "transferqueue", marker = "(platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm') or (platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-fsdp') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-mcore') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-automodel' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-fsdp' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-sglang') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-mcore' and extra == 'extra-7-nemo-rl-vllm') or (sys_platform != 'linux' and extra == 'extra-7-nemo-rl-sglang' and extra == 'extra-7-nemo-rl-vllm')" }, @@ -3521,9 +3519,6 @@ requires-dist = [ { name = "timm" }, { name = "torch", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torch", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, - { name = "torchaudio", marker = "sys_platform != 'darwin'", specifier = "==2.11.0", index = "https://download.pytorch.org/whl/cu130" }, - { name = "torchaudio", marker = "sys_platform == 'darwin'", specifier = "==2.11.0", index = "https://pypi.org/simple" }, - { name = "torchcodec", specifier = ">=0.3.0" }, { name = "torchdata" }, { name = "torchvision", marker = "sys_platform != 'darwin'", specifier = "==0.26.0", index = "https://download.pytorch.org/whl/cu130" }, { name = "torchvision", marker = "sys_platform == 'darwin'", specifier = "==0.26.0", index = "https://pypi.org/simple" }, @@ -6282,13 +6277,13 @@ wheels = [ [[package]] name = "torchaudio" -version = "2.11.0+cu130" -source = { registry = "https://download.pytorch.org/whl/cu130" } +version = "2.11.0" +source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://download-r2.pytorch.org/whl/cu130/torchaudio-2.11.0%2Bcu130-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:23498b01097648e304e78d6495a9f5bdce8441a802afc3025e2561973d74c025", upload-time = "2026-03-23T15:50:26Z" }, - { url = "https://download-r2.pytorch.org/whl/cu130/torchaudio-2.11.0%2Bcu130-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e9c07cfdab691454092ff12d21dd1407a4bb8ad081d38f222cf6fcf6abcc18c8", upload-time = "2026-03-23T15:50:26Z" }, - { url = "https://download-r2.pytorch.org/whl/cu130/torchaudio-2.11.0%2Bcu130-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:f9b277a0d3b2ab4385778146b7e879716f36b6f2080f7190ec744e3383511791", upload-time = "2026-03-23T15:50:26Z" }, - { url = "https://download-r2.pytorch.org/whl/cu130/torchaudio-2.11.0%2Bcu130-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:d07c4cbe4bec3e15bb18ba163058038f5f5fc1775c3061685c194439af4d2e9f", upload-time = "2026-03-23T15:50:26Z" }, + { url = "https://files.pythonhosted.org/packages/85/70/249c1498ebdad3e7752866635ec0855fc0dcf898beccda5a9d2b9df8e4d0/torchaudio-2.11.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:b034d7672f1c415434f48ef17807f2cce47f29e8795338c751d4e596c9fbe8b5", size = 1618523, upload-time = "2026-03-23T18:13:15.703Z" }, + { url = "https://files.pythonhosted.org/packages/4f/98/be13fe35d9aa5c26381c0e453c828a789d15c007f8f7d08c95341d19974d/torchaudio-2.11.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1c1101c1243ef0e4063ec63298977e2d3655c15cf88d9eb0a1bd4fe2db9f47ea", size = 1771992, upload-time = "2026-03-23T18:13:35.343Z" }, + { url = "https://files.pythonhosted.org/packages/06/95/1ad1507482e7263e556709a3f5f87fecd375a0742cdaf238806c8e72eaad/torchaudio-2.11.0-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:9fe3083c62e035646483a14e180d33561bdc2eed436c9ab1259c137fb7120b4a", size = 1618546, upload-time = "2026-03-23T18:13:29.686Z" }, + { url = "https://files.pythonhosted.org/packages/98/4c/480328ba07487eb9890406720304d0d460dd7a6a64098614f5aa53b662ca/torchaudio-2.11.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:13cff988697ccbad539987599f9dc672f40c417bed67570b365e4e5002bbd096", size = 1771991, upload-time = "2026-03-23T18:13:30.843Z" }, ] [[package]] From 3e22196ae60a5519a1f0e7f885b6fb4a32923451 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Mon, 13 Jul 2026 14:50:39 -0500 Subject: [PATCH 09/17] docs: remove internal compliance language from comments and docs Signed-off-by: Kajal Jain --- docs/guides/grpo-audio.md | 5 ++--- pyproject.toml | 6 ++---- scripts/install_audio_deps.sh | 4 ---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/docs/guides/grpo-audio.md b/docs/guides/grpo-audio.md index fd4dacbd90..5bda635139 100644 --- a/docs/guides/grpo-audio.md +++ b/docs/guides/grpo-audio.md @@ -1,8 +1,7 @@ # Audio Post-training with Nemo-RL -> **Audio dependencies are not pre-installed in the NeMo-RL container.** `torchaudio` and -> `torchcodec` bundle an FFmpeg build that includes H.264/AAC decoder implementations -> subject to patent licensing. Run the following script once before training or evaluation: +> **Audio dependencies are not pre-installed in the NeMo-RL container.** +> Run the following script once before training or evaluation: > > ```bash > bash scripts/install_audio_deps.sh diff --git a/pyproject.toml b/pyproject.toml index ccdbce5753..df05ae9bca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,10 +50,8 @@ dependencies = [ "sympy>=1.14.0", "pillow>=12.1.1", "torchvision==0.26.0", - # torchaudio and torchcodec bundle an FFmpeg build that includes H.264/AAC - # decoder implementations subject to patent licensing (requires org3 approval - # to ship). They are NOT installed in the container image. Run - # scripts/install_audio_deps.sh before using audio features or audio tests. + # torchaudio and torchcodec are NOT installed in the container image. + # Run scripts/install_audio_deps.sh before using audio features or audio tests. # Keep the base range broad enough while allowing backend extras to tighten as needed. # Floor raised to 5.5.0 for Gemma 4 support. "transformers>=5.5.0,<5.9.0", diff --git a/scripts/install_audio_deps.sh b/scripts/install_audio_deps.sh index 5977f66805..10cba9a601 100644 --- a/scripts/install_audio_deps.sh +++ b/scripts/install_audio_deps.sh @@ -1,10 +1,6 @@ #!/bin/bash # Install audio dependencies that are NOT shipped in the NeMo-RL container. # -# torchaudio and torchcodec bundle an FFmpeg build containing H.264/AAC decoder -# implementations that are subject to patent licensing and require org3 approval -# to distribute. They are therefore excluded from the container image. -# # Run this script before using audio features or running audio tests: # # bash scripts/install_audio_deps.sh From a49e73293b9665aecd147442ed13fe725328a0d4 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Mon, 13 Jul 2026 14:51:08 -0500 Subject: [PATCH 10/17] refactor: consolidate audio-deps install into common.env name check Replace 6 per-script bash calls with a single block in common.env that fires only when the calling script name matches omni/audio/avqa. LLM tests are unaffected. New audio/omni recipes are covered automatically. Signed-off-by: Kajal Jain --- tests/test_suites/llm/common.env | 5 +++++ ..._grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh | 1 - ...m_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh | 1 - .../vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh | 1 - .../vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh | 1 - .../vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh | 1 - .../vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh | 1 - 7 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_suites/llm/common.env b/tests/test_suites/llm/common.env index eb50846027..157000a926 100644 --- a/tests/test_suites/llm/common.env +++ b/tests/test_suites/llm/common.env @@ -9,6 +9,11 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) # catch-22 to get the project root and mark it safe if you don't know the project root PROJECT_ROOT=$(realpath $SCRIPT_DIR/../../..) +# Auto-install audio deps for audio/omni test scripts (no-op for LLM tests). +if [[ "${BASH_SOURCE[1]:-}" =~ (omni|audio|avqa) ]]; then + bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +fi + exit_if_max_steps_reached() { # Early stopping to save compute if max step has been reached STEPS_SO_FAR=$(jq 'to_entries | .[] | select(.key == "train/loss") | .value | keys | map(tonumber) | max' $JSON_METRICS || echo 0) diff --git a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh index d237501849..81c7e5624a 100755 --- a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-clevr-1n8g-automodel-ep8.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh index 7815741e11..318b6a9649 100755 --- a/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-nemotron-omni-30ba3b-mmpr-4n8g-automodel-ep8.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=4 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh index 35dd2b3e95..27badf7356 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh index 5d648cacdc..af93806af0 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-audiomcq-1n8g-megatron.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh index 3cb229e6f9..499d87dad4 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen2.5-omni-7b-intent-1n8g-megatron.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=1 diff --git a/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh b/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh index c3f58b926e..83ad35fb1e 100755 --- a/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh +++ b/tests/test_suites/vlm/vlm_grpo-qwen3-omni-30ba3b-audiomcq-4n8g-megatron.v1.sh @@ -1,7 +1,6 @@ #!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) source $SCRIPT_DIR/common.env -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" # ===== BEGIN CONFIG ===== NUM_NODES=4 From 82caa367c0869aa0848f0cd93960bfe75550629d Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Wed, 15 Jul 2026 12:33:40 -0500 Subject: [PATCH 11/17] fix: remove torchcodec from audio install script torchcodec is not used in nemo_rl source (video uses torchvision via transformers.video_utils, audio uses torchaudio). The PyPI torchcodec wheel links against FFmpeg at load time but can't find torchaudio's bundled FFmpeg libs, causing an OSError on import. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- scripts/install_audio_deps.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install_audio_deps.sh b/scripts/install_audio_deps.sh index 10cba9a601..cb159e59cb 100644 --- a/scripts/install_audio_deps.sh +++ b/scripts/install_audio_deps.sh @@ -26,11 +26,10 @@ if [[ "$HAS_FFMPEG" == "yes" ]]; then exit 0 fi -echo "[audio-deps] Installing torchaudio==2.11.0 (pytorch-cu130, with FFmpeg) and torchcodec..." +echo "[audio-deps] Installing torchaudio==2.11.0 (pytorch-cu130, with bundled FFmpeg)..." uv pip install \ --index-url https://download.pytorch.org/whl/cu130 \ --extra-index-url https://pypi.org/simple \ --reinstall-package torchaudio \ - "torchaudio==2.11.0" \ - "torchcodec>=0.3.0" + "torchaudio==2.11.0" echo "[audio-deps] Done." From c2c23846636abf521abcefae3a8cdb414ce6b4a5 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Wed, 15 Jul 2026 12:57:50 -0500 Subject: [PATCH 12/17] fix: install ffmpeg at test time; switch video backend to torchcodec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - install_audio_deps.sh: apt-get install ffmpeg before torchcodec (torchcodec dlopens libavcodec.so.* at runtime; not bundled by either torchaudio or torchcodec wheels). Re-add torchcodec>=0.3.0 (torchaudio 2.11+ routes torchaudio.load through torchcodec). Fix idempotency check to test `import torchcodec` instead of nonexistent libav* files in torchaudio/lib (torchaudio 2.11 dropped bundled FFmpeg). - multimodal_utils.py, processors.py: switch load_video backend from "torchvision" to "torchcodec" — torchvision.io.read_video was removed in torchvision 0.26.0; transformers routes "torchcodec" to TorchCodec. - pyrefly.toml: add torchcodec.* to replace-imports-with-any. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- nemo_rl/data/multimodal_utils.py | 2 +- nemo_rl/data/processors.py | 2 +- pyrefly.toml | 1 + scripts/install_audio_deps.sh | 28 +++++++++++----------------- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/nemo_rl/data/multimodal_utils.py b/nemo_rl/data/multimodal_utils.py index bcea192a44..160d6a0923 100644 --- a/nemo_rl/data/multimodal_utils.py +++ b/nemo_rl/data/multimodal_utils.py @@ -381,7 +381,7 @@ def load_media_from_message( else {} ) loaded_media["video"].append( - load_video(vid, backend="torchvision", **load_video_kwargs)[0] + load_video(vid, backend="torchcodec", **load_video_kwargs)[0] ) else: loaded_media["video"].append(vid) diff --git a/nemo_rl/data/processors.py b/nemo_rl/data/processors.py index 95b1a825f1..39aae573ae 100644 --- a/nemo_rl/data/processors.py +++ b/nemo_rl/data/processors.py @@ -538,7 +538,7 @@ def vlm_hf_data_processor( video_value = content["video"] if isinstance(video_value, str): video_value = load_video( - video_value, backend="torchvision", **load_video_kwargs + video_value, backend="torchcodec", **load_video_kwargs )[0] # Replace path with loaded frames so apply_chat_template can consume it user_message["content"].append({"type": "video", "video": video_value}) diff --git a/pyrefly.toml b/pyrefly.toml index d346bb8bda..7c124860f3 100644 --- a/pyrefly.toml +++ b/pyrefly.toml @@ -11,6 +11,7 @@ replace-imports-with-any = [ "sympy.*", "torchdata.*", "torchaudio.*", + "torchcodec.*", "nemo.*", "megatron.*", "ray.*", diff --git a/scripts/install_audio_deps.sh b/scripts/install_audio_deps.sh index cb159e59cb..99d9fb5e00 100644 --- a/scripts/install_audio_deps.sh +++ b/scripts/install_audio_deps.sh @@ -8,28 +8,22 @@ # Safe to call multiple times — exits immediately if already installed. set -euo pipefail -# The container already has the PyPI torchaudio stub (installed via sglang/vllm), -# but it does NOT bundle FFmpeg — audio decoding requires the pytorch-cu130 build. -# Check specifically for bundled FFmpeg libs (libavcodec.so.*) in torchaudio's lib dir. -HAS_FFMPEG=$(python -c " -import torchaudio, os -lib_dir = os.path.join(os.path.dirname(torchaudio.__file__), 'lib') -has = os.path.isdir(lib_dir) and any( - f.startswith(('libav', 'libswscale', 'libswresample')) - for f in (os.listdir(lib_dir) if os.path.isdir(lib_dir) else []) -) -print('yes' if has else 'no') -" 2>/dev/null || echo "no") - -if [[ "$HAS_FFMPEG" == "yes" ]]; then - echo "[audio-deps] torchaudio with bundled FFmpeg already installed, skipping." +# Fast exit: if torchcodec imports cleanly it already has FFmpeg available. +if python -c "import torchcodec" 2>/dev/null; then + echo "[audio-deps] Already installed and functional, skipping." exit 0 fi -echo "[audio-deps] Installing torchaudio==2.11.0 (pytorch-cu130, with bundled FFmpeg)..." +# Install system FFmpeg — torchcodec dlopens libavcodec.so.* at runtime. +echo "[audio-deps] Installing system FFmpeg..." +apt-get install -y --no-install-recommends ffmpeg + +# torchaudio 2.11+ routes torchaudio.load through torchcodec, so both are needed. +echo "[audio-deps] Installing torchaudio==2.11.0 and torchcodec..." uv pip install \ --index-url https://download.pytorch.org/whl/cu130 \ --extra-index-url https://pypi.org/simple \ --reinstall-package torchaudio \ - "torchaudio==2.11.0" + "torchaudio==2.11.0" \ + "torchcodec>=0.3.0" echo "[audio-deps] Done." From b755507685f44a21c7c104933a3b9043e7563280 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Wed, 15 Jul 2026 14:26:10 -0500 Subject: [PATCH 13/17] fix: add apt-get update before ffmpeg install; add audio deps to sft_avlm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - install_audio_deps.sh: run apt-get update before apt-get install to avoid stale cache failures on CI containers - tests/functional/sft_avlm.sh: add install_audio_deps.sh call — the daily-omni dataset decodes audio/video via torchaudio/torchcodec, which are not in the shipped container Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- scripts/install_audio_deps.sh | 2 +- tests/functional/sft_avlm.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install_audio_deps.sh b/scripts/install_audio_deps.sh index 99d9fb5e00..84bdd35434 100644 --- a/scripts/install_audio_deps.sh +++ b/scripts/install_audio_deps.sh @@ -16,7 +16,7 @@ fi # Install system FFmpeg — torchcodec dlopens libavcodec.so.* at runtime. echo "[audio-deps] Installing system FFmpeg..." -apt-get install -y --no-install-recommends ffmpeg +apt-get update && apt-get install -y --no-install-recommends ffmpeg # torchaudio 2.11+ routes torchaudio.load through torchcodec, so both are needed. echo "[audio-deps] Installing torchaudio==2.11.0 and torchcodec..." diff --git a/tests/functional/sft_avlm.sh b/tests/functional/sft_avlm.sh index 38e6b76e7c..86eea254e2 100644 --- a/tests/functional/sft_avlm.sh +++ b/tests/functional/sft_avlm.sh @@ -10,6 +10,9 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail +# Audio/video deps (torchaudio/torchcodec/ffmpeg) are not in the shipped container. +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME LOG_DIR=$EXP_DIR/logs From 55fc91b50d6add791b0d4493de33eefa0e44ca5d Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Wed, 15 Jul 2026 16:09:49 -0500 Subject: [PATCH 14/17] fix: expand av-deps hook to cover all vlm test scripts Video decoding (torchvision backend="torchcodec") requires torchcodec + system FFmpeg, same as audio. VLM scripts (vlm_grpo-*) that only use video (e.g. clevr, mmpr, geo3k) were not covered by the (omni|audio|avqa) pattern. Adding "vlm" catches all vlm_* scripts without affecting LLM tests. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- tests/test_suites/llm/common.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_suites/llm/common.env b/tests/test_suites/llm/common.env index 157000a926..9775903f0f 100644 --- a/tests/test_suites/llm/common.env +++ b/tests/test_suites/llm/common.env @@ -9,8 +9,8 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) # catch-22 to get the project root and mark it safe if you don't know the project root PROJECT_ROOT=$(realpath $SCRIPT_DIR/../../..) -# Auto-install audio deps for audio/omni test scripts (no-op for LLM tests). -if [[ "${BASH_SOURCE[1]:-}" =~ (omni|audio|avqa) ]]; then +# Auto-install av deps for all VLM scripts and audio/omni/avqa scripts (no-op for LLM tests). +if [[ "${BASH_SOURCE[1]:-}" =~ (omni|audio|avqa|vlm) ]]; then bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" fi From 7dd4251b42b0e2e8d0973814f838c6b4311f3e9e Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Wed, 15 Jul 2026 19:18:27 -0500 Subject: [PATCH 15/17] fix: install audio/video deps before data unit tests in GitHub CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit L0_Unit_Tests_Data runs dailyomni and other dataset tests that decode real audio/video via torchaudio/torchcodec. These are not installed in the shipped container — install_audio_deps.sh sets them up at test time (apt-get install ffmpeg + torchaudio + torchcodec). No other unit shard is affected. Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- tests/unit/L0_Unit_Tests_Data.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/unit/L0_Unit_Tests_Data.sh b/tests/unit/L0_Unit_Tests_Data.sh index 9ed0423c2e..0094201eeb 100644 --- a/tests/unit/L0_Unit_Tests_Data.sh +++ b/tests/unit/L0_Unit_Tests_Data.sh @@ -17,4 +17,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/run_unit_shard_common.sh" +# Audio/video deps (torchaudio/torchcodec/ffmpeg) are not in the shipped container. +# Data unit tests (e.g. dailyomni) decode real audio/video via these deps. +bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + uv run --no-sync bash -x ./tests/run_unit.sh "unit/data/" "${EXCLUDED_UNIT_TESTS[@]}" --cov=nemo_rl --cov-report=term-missing --cov-report=json --hf-gated From 6204d56f531ed75561fd0623d50b7f360aa249e9 Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Thu, 16 Jul 2026 02:13:44 -0500 Subject: [PATCH 16/17] docs: add audio/video dependency install section to grpo-audio-visual guide Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- docs/guides/grpo-audio-visual.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/guides/grpo-audio-visual.md b/docs/guides/grpo-audio-visual.md index ca82637574..fdd18ac960 100644 --- a/docs/guides/grpo-audio-visual.md +++ b/docs/guides/grpo-audio-visual.md @@ -4,6 +4,18 @@ This guide explains how to use NeMo RL to train [Qwen2.5-Omni-7B](https://huggin Each training sample feeds the Qwen2.5-Omni processor both the video stream (8 frames) and the audio track decoded from the same file at 16 kHz mono. Audio and video flow as two **independent multimodal items** per prompt: the dataset emits `{type: video}` + `{type: audio}` content items, the Qwen2.5-Omni chat template renders both `<|VIDEO|>` and `<|AUDIO|>` placeholders, and vLLM rollouts populate `multi_modal_data["video"]` and `multi_modal_data["audio"]` from the same sample. +## 0. Install Audio/Video Dependencies + +The NeMo RL container does not ship `torchaudio`, `torchcodec`, or system FFmpeg. Run the helper script once before training or evaluation: + +```bash +bash scripts/install_audio_deps.sh +``` + +This installs system FFmpeg (required by `torchcodec` at runtime) and pins `torchaudio==2.11.0` + `torchcodec>=0.3.0` into the container venv. The script is idempotent — re-running it on a machine where the deps are already present exits immediately. + +> **Note:** `decord` and `av` (PyAV) are **not** used. Audio and video are decoded via `torchcodec` (backed by system FFmpeg) and `torchaudio` respectively. + ## 1. Train the Model Run GRPO training with the provided config: From 17e1154fc9da17f7f04643128ed66647a80e942d Mon Sep 17 00:00:00 2001 From: Kajal Jain Date: Thu, 16 Jul 2026 16:34:01 -0500 Subject: [PATCH 17/17] refactor: move install_audio_deps.sh from scripts/ to tools/ Also fix two stale comments in pyproject.toml: - drop torchaudio from the uv.sources index comment - update script path reference from scripts/ to tools/ Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Kajal Jain --- docs/guides/grpo-audio-visual.md | 2 +- docs/guides/grpo-audio.md | 2 +- pyproject.toml | 4 ++-- tests/functional/audio_grpo_megatron.sh | 2 +- tests/functional/eval_audio.sh | 2 +- tests/functional/eval_daily_omni.sh | 2 +- tests/functional/sft_avlm.sh | 2 +- tests/test_suites/llm/common.env | 2 +- tests/unit/L0_Unit_Tests_Data.sh | 2 +- {scripts => tools}/install_audio_deps.sh | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename {scripts => tools}/install_audio_deps.sh (96%) mode change 100644 => 100755 diff --git a/docs/guides/grpo-audio-visual.md b/docs/guides/grpo-audio-visual.md index fdd18ac960..ce31bde9b5 100644 --- a/docs/guides/grpo-audio-visual.md +++ b/docs/guides/grpo-audio-visual.md @@ -9,7 +9,7 @@ Each training sample feeds the Qwen2.5-Omni processor both the video stream (8 f The NeMo RL container does not ship `torchaudio`, `torchcodec`, or system FFmpeg. Run the helper script once before training or evaluation: ```bash -bash scripts/install_audio_deps.sh +bash tools/install_audio_deps.sh ``` This installs system FFmpeg (required by `torchcodec` at runtime) and pins `torchaudio==2.11.0` + `torchcodec>=0.3.0` into the container venv. The script is idempotent — re-running it on a machine where the deps are already present exits immediately. diff --git a/docs/guides/grpo-audio.md b/docs/guides/grpo-audio.md index 09ca57ce6f..e92fd36f3e 100644 --- a/docs/guides/grpo-audio.md +++ b/docs/guides/grpo-audio.md @@ -4,7 +4,7 @@ > Run the following script once before training or evaluation: > > ```bash -> bash scripts/install_audio_deps.sh +> bash tools/install_audio_deps.sh > ``` > > The script is a no-op if they are already installed. Audio tests run it automatically. diff --git a/pyproject.toml b/pyproject.toml index df05ae9bca..966abd56a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dependencies = [ "pillow>=12.1.1", "torchvision==0.26.0", # torchaudio and torchcodec are NOT installed in the container image. - # Run scripts/install_audio_deps.sh before using audio features or audio tests. + # Run tools/install_audio_deps.sh before using audio features or audio tests. # Keep the base range broad enough while allowing backend extras to tighten as needed. # Floor raised to 5.5.0 for Gemma 4 support. "transformers>=5.5.0,<5.9.0", @@ -256,7 +256,7 @@ nemo-automodel = { path = "3rdparty/Automodel-workspace/Automodel", editable = t megatron-bridge = { path = "3rdparty/Megatron-Bridge-workspace", editable = true } nemo_gym = { workspace = true } nemo_run = { git = "https://github.com/NVIDIA-NeMo/Run", rev = "414f0077c648fde2c71bb1186e97ccbf96d6844c" } -# torch/torchaudio/torchvision/triton all come from the torch index in order to pick up aarch64 wheels +# torch/torchvision/triton all come from the torch index in order to pick up aarch64 wheels torch = [ { index = "pytorch-cu130", marker = "sys_platform != 'darwin'" }, { index = "pypi", marker = "sys_platform == 'darwin'" }, diff --git a/tests/functional/audio_grpo_megatron.sh b/tests/functional/audio_grpo_megatron.sh index d5808eb2c5..fa2a45114b 100644 --- a/tests/functional/audio_grpo_megatron.sh +++ b/tests/functional/audio_grpo_megatron.sh @@ -8,7 +8,7 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail # Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +bash "$PROJECT_ROOT/tools/install_audio_deps.sh" EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME diff --git a/tests/functional/eval_audio.sh b/tests/functional/eval_audio.sh index f069a8b281..64d003aa3d 100644 --- a/tests/functional/eval_audio.sh +++ b/tests/functional/eval_audio.sh @@ -8,7 +8,7 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail # Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +bash "$PROJECT_ROOT/tools/install_audio_deps.sh" EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME diff --git a/tests/functional/eval_daily_omni.sh b/tests/functional/eval_daily_omni.sh index b24fffe8eb..637ef93a67 100755 --- a/tests/functional/eval_daily_omni.sh +++ b/tests/functional/eval_daily_omni.sh @@ -8,7 +8,7 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail # Audio deps (torchaudio/torchcodec) are not in the shipped container; install at test time. -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +bash "$PROJECT_ROOT/tools/install_audio_deps.sh" EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME diff --git a/tests/functional/sft_avlm.sh b/tests/functional/sft_avlm.sh index 86eea254e2..e3728ff78b 100644 --- a/tests/functional/sft_avlm.sh +++ b/tests/functional/sft_avlm.sh @@ -11,7 +11,7 @@ git config --global --add safe.directory $PROJECT_ROOT set -eou pipefail # Audio/video deps (torchaudio/torchcodec/ffmpeg) are not in the shipped container. -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +bash "$PROJECT_ROOT/tools/install_audio_deps.sh" EXP_NAME=$(basename $0 .sh) EXP_DIR=$SCRIPT_DIR/$EXP_NAME diff --git a/tests/test_suites/llm/common.env b/tests/test_suites/llm/common.env index 9775903f0f..427cd4a7de 100644 --- a/tests/test_suites/llm/common.env +++ b/tests/test_suites/llm/common.env @@ -11,7 +11,7 @@ PROJECT_ROOT=$(realpath $SCRIPT_DIR/../../..) # Auto-install av deps for all VLM scripts and audio/omni/avqa scripts (no-op for LLM tests). if [[ "${BASH_SOURCE[1]:-}" =~ (omni|audio|avqa|vlm) ]]; then - bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" + bash "$PROJECT_ROOT/tools/install_audio_deps.sh" fi exit_if_max_steps_reached() { diff --git a/tests/unit/L0_Unit_Tests_Data.sh b/tests/unit/L0_Unit_Tests_Data.sh index 0094201eeb..02bf4e19c2 100644 --- a/tests/unit/L0_Unit_Tests_Data.sh +++ b/tests/unit/L0_Unit_Tests_Data.sh @@ -19,6 +19,6 @@ source "$(dirname "${BASH_SOURCE[0]}")/run_unit_shard_common.sh" # Audio/video deps (torchaudio/torchcodec/ffmpeg) are not in the shipped container. # Data unit tests (e.g. dailyomni) decode real audio/video via these deps. -bash "$PROJECT_ROOT/scripts/install_audio_deps.sh" +bash "$PROJECT_ROOT/tools/install_audio_deps.sh" uv run --no-sync bash -x ./tests/run_unit.sh "unit/data/" "${EXCLUDED_UNIT_TESTS[@]}" --cov=nemo_rl --cov-report=term-missing --cov-report=json --hf-gated diff --git a/scripts/install_audio_deps.sh b/tools/install_audio_deps.sh old mode 100644 new mode 100755 similarity index 96% rename from scripts/install_audio_deps.sh rename to tools/install_audio_deps.sh index 84bdd35434..9da6eb04b4 --- a/scripts/install_audio_deps.sh +++ b/tools/install_audio_deps.sh @@ -3,7 +3,7 @@ # # Run this script before using audio features or running audio tests: # -# bash scripts/install_audio_deps.sh +# bash tools/install_audio_deps.sh # # Safe to call multiple times — exits immediately if already installed. set -euo pipefail