Skip to content

Remove io deprecated #3965

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

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
15ea621
WIP
Jul 8, 2025
cd3d440
Use torchcodec for loading
Jul 8, 2025
7e2b482
Merge branch 'codec_use' into remove_io_deprecated
Jul 9, 2025
74135c8
Add torchcodec to CI installer
Jul 9, 2025
a4576a7
Use torchcodec in examples and integration tests too
Jul 9, 2025
7ad6634
Merge branch 'codec_use' into remove_io_deprecated
Jul 9, 2025
62c7fe6
Test torchcodec installation
NicolasHug Jul 10, 2025
e7b9da6
empty
NicolasHug Jul 10, 2025
ae9baff
dont even build audio
NicolasHug Jul 10, 2025
758ff52
Try ffmpeg 4.4.2
NicolasHug Jul 10, 2025
f7a2654
force ffmpeg<5
NicolasHug Jul 10, 2025
e929d65
UGH
NicolasHug Jul 10, 2025
b95e3c8
Put back building torchaudio
NicolasHug Jul 10, 2025
a1c086f
Put back rest of dependencies, and run tests
NicolasHug Jul 10, 2025
c3690ff
Merge branch 'installation' into codec_use
Jul 10, 2025
6ec7718
Ignore tests with ffmpeg bugs
Jul 10, 2025
1255bd1
Move pytest import
Jul 10, 2025
9e0e89a
Load torchcodec lazily
Jul 11, 2025
ea37fcd
Remove hack
Jul 11, 2025
01dda4a
Skip ffmpeg failing tests
Jul 11, 2025
1194ff8
Move failing test ids file to same directory
Jul 11, 2025
3ef7c55
Add torchcodec to some requirements
Jul 11, 2025
02d11af
Try requirements index url option
Jul 11, 2025
f853397
Add more ffmpeg failing tests
Jul 11, 2025
86c40b8
Install torchcodec at same time as torch for docs
Jul 11, 2025
78bbf70
Add options from old loader
Jul 11, 2025
1c38f95
Give installation error message if torchcodec not installed
Jul 11, 2025
7d344bb
Merge branch 'codec_use' into remove_io_deprecated
Jul 11, 2025
3d0d836
Remove prototype tests
Jul 11, 2025
c3f537f
Undo deprecation of download_asset
Jul 11, 2025
5d5ba84
Remove hide_seek wrapping for torchcodec
Jul 11, 2025
d0996f0
Remove scipy wav loading code
Jul 11, 2025
98fbd03
Remove hide_seek wrapping for torchcodec
Jul 11, 2025
6fc86ee
Delete libtorio
Jul 11, 2025
bc2f5c4
Wrap boto3 response in bytesio
Jul 11, 2025
b2b5f40
Wrap boto3 response in bytesio
Jul 11, 2025
1f1b019
Remove tutorial section on streaming loading
Jul 11, 2025
529cbfd
Merge branch 'codec_use' into remove_io_deprecated
Jul 11, 2025
9fc1fef
Remove audio saving section of audio_io_tutorial
Jul 12, 2025
5ccde5e
Remove prototype docs
Jul 12, 2025
3aeda6f
Removed tutorials for deprecated features
Jul 12, 2025
165ebd6
Delete tutorials with StreamWriter and StreamReaderr
Jul 12, 2025
834909d
More deletions
Jul 12, 2025
7eb0633
Remove TEDLIUM example
Jul 12, 2025
3f39460
WIP
Jul 12, 2025
f3a1f82
Use torchcodec url streaming
Jul 12, 2025
9a00ebb
Use urls for load_codec
Jul 12, 2025
4e83a7a
Allow keyword arguments to load_torchcodec
Jul 12, 2025
380eaa7
Remove frame_offset arguments from load_torchcodec
Jul 13, 2025
d81f2b5
Remove references to StreamReader
Jul 13, 2025
85c8aa9
Merge branch 'codec_use' into remove_io_deprecated
Jul 13, 2025
d3b6d92
Fix typo
Jul 13, 2025
500ad06
Fix typo
Jul 13, 2025
7cf43b3
Remove use of num_frames for load_torchcodec
Jul 14, 2025
80184db
Merge branch 'codec_use' into remove_io_deprecated
Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/scripts/unittest-linux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ case $GPU_ARCH_TYPE in
;;
esac
PYTORCH_WHEEL_INDEX="https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/${GPU_ARCH_ID}"
pip install --progress-bar=off --pre torch --index-url="${PYTORCH_WHEEL_INDEX}"
pip install --progress-bar=off --pre torch torchcodec --index-url="${PYTORCH_WHEEL_INDEX}"


# 2. Install torchaudio
Expand All @@ -85,6 +85,9 @@ export BUILD_CPP_TEST=1
python setup.py install

# 3. Install Test tools
conda install -y "ffmpeg<5"
python -c "import torch; import torchaudio; import torchcodec; print(torch.__version__, torchaudio.__version__, torchcodec.__version__)"

printf "* Installing test tools\n"
NUMBA_DEV_CHANNEL=""
if [[ "$(python --version)" = *3.9* || "$(python --version)" = *3.10* ]]; then
Expand All @@ -94,7 +97,7 @@ if [[ "$(python --version)" = *3.9* || "$(python --version)" = *3.10* ]]; then
fi
(
set -x
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} sox libvorbis parameterized 'requests>=2.20' 'ffmpeg>=6,<7'
conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} sox libvorbis parameterized 'requests>=2.20'
pip install kaldi-io SoundFile librosa coverage pytest pytest-cov scipy expecttest unidecode inflect Pillow sentencepiece pytorch-lightning 'protobuf<4.21.0' demucs tinytag pyroomacoustics flashlight-text git+https://github.com/kpu/kenlm

# TODO: might be better to fix the single call to `pip install` above
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

GPU_ARCH_ID=cu126 # This is hard-coded and must be consistent with gpu-arch-version.
PYTORCH_WHEEL_INDEX="https://download.pytorch.org/whl/${CHANNEL}/${GPU_ARCH_ID}"
pip install --progress-bar=off --pre torch --index-url="${PYTORCH_WHEEL_INDEX}"
pip install --progress-bar=off --pre torch torchcodec --index-url="${PYTORCH_WHEEL_INDEX}"

echo "::endgroup::"
echo "::group::Install TorchAudio"
Expand Down
15 changes: 1 addition & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif()


# Options
option(BUILD_SOX "Build libsox statically" ON)
option(BUILD_SOX "Build libsox statically" OFF)
option(BUILD_RIR "Enable RIR simulation" ON)
option(BUILD_RNNT "Enable RNN transducer" ON)
option(BUILD_ALIGN "Enable forced alignment" ON)
Expand Down Expand Up @@ -166,19 +166,6 @@ else()
endif()

add_subdirectory(src/libtorchaudio)
if (BUILD_SOX)
add_subdirectory(third_party/sox)
add_subdirectory(src/libtorchaudio/sox)
endif()
if (USE_FFMPEG)
if (DEFINED ENV{FFMPEG_ROOT})
add_subdirectory(third_party/ffmpeg/single)
else()
message(STATUS "Building FFmpeg integration with multi version support")
add_subdirectory(third_party/ffmpeg/multi)
endif()
add_subdirectory(src/libtorio/ffmpeg)
endif()
if (BUILD_CUDA_CTC_DECODER)
if (NOT USE_CUDA)
message(FATAL "BUILD_CUDA_CTC_DECODER=1 but USE_CUDA=0.")
Expand Down
11 changes: 0 additions & 11 deletions cmake/TorchAudioHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ function(torchaudio_library name source include_dirs link_libraries compile_defs
)
endfunction()

function(torio_library name source include_dirs link_libraries compile_defs)
_library(
torio/lib
"${name}"
"${source}"
"${include_dirs}"
"${link_libraries}"
"${compile_defs}"
)
endfunction()

if (BUILD_TORCHAUDIO_PYTHON_EXTENSION)
# See https://github.com/pytorch/pytorch/issues/38122
find_library(TORCH_PYTHON_LIBRARY torch_python PATHS "${TORCH_INSTALL_PREFIX}/lib")
Expand Down
1 change: 0 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ docset: html
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
doxygen source/Doxyfile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@python post_process_dispatcher.py $(BUILDDIR)

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Jinja2<3.1.0
matplotlib<=3.8
pyparsing<3,>=2.0.2
torchcodec

# C++ docs
breathe==4.34.0
Expand Down
Loading
Loading