-
Notifications
You must be signed in to change notification settings - Fork 515
chore: replace decord2 with torchvision/torchaudio for media loading #3107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0d90010
chore: replace decord2 with torchvision/torchaudio for media loading
kajalj22 aff511d
chore: update uv.lock to remove decord2
kajalj22 25b19e2
chore: merge main into replace-decord-torchvision
kajalj22 2445e54
Merge remote-tracking branch 'origin/main' into replace-decord-torchv…
kajalj22 029b9ee
fix: replace decord in datasets/utils.py and add torchaudio to pyrefly
kajalj22 7bc9016
chore: exclude av (PyAV) from container via uv override
kajalj22 a66a82e
fix: replace remaining decord backend in processors.py; exclude decor…
kajalj22 3e21f62
Merge remote-tracking branch 'origin/main' into replace-decord-torchv…
kajalj22 e52aac7
fix: add torchaudio to main project dependencies
kajalj22 cd54863
fix: add torchcodec to main deps for torchaudio video→audio decoding
kajalj22 8dba7d2
feat: exclude torchaudio FFmpeg build from container; add audio insta…
kajalj22 3e22196
docs: remove internal compliance language from comments and docs
kajalj22 a49e732
refactor: consolidate audio-deps install into common.env name check
kajalj22 3204c3c
chore: merge main into replace-decord-torchvision
kajalj22 82caa36
fix: remove torchcodec from audio install script
kajalj22 c2c2384
fix: install ffmpeg at test time; switch video backend to torchcodec
kajalj22 18361c7
chore: merge main into replace-decord-torchvision
kajalj22 b755507
fix: add apt-get update before ffmpeg install; add audio deps to sft_…
kajalj22 55fc91b
fix: expand av-deps hook to cover all vlm test scripts
kajalj22 436db97
Merge remote-tracking branch 'origin/main' into replace-decord-torchv…
kajalj22 7dd4251
fix: install audio/video deps before data unit tests in GitHub CI
kajalj22 2fe5480
Merge remote-tracking branch 'origin/main' into replace-decord-torchv…
kajalj22 6204d56
docs: add audio/video dependency install section to grpo-audio-visual…
kajalj22 bf18ead
Merge remote-tracking branch 'origin/main' into replace-decord-torchv…
kajalj22 17e1154
refactor: move install_audio_deps.sh from scripts/ to tools/
kajalj22 3a0d641
Merge branch 'main' into replace-decord-torchvision
kajalj22 0af12fe
Merge branch 'main' into replace-decord-torchvision
chtruong814 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/bin/bash | ||
| # Install audio dependencies that are NOT shipped in the NeMo-RL container. | ||
| # | ||
| # 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 | ||
|
|
||
| # 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 | ||
|
|
||
| # Install system FFmpeg — torchcodec dlopens libavcodec.so.* at runtime. | ||
| echo "[audio-deps] Installing system 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..." | ||
| 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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.