From 2ff32ce9c648bd488731163141dad9d0aa093023 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 14 Aug 2025 09:39:48 +0100 Subject: [PATCH 1/7] Remove dependencies from doc job --- .github/workflows/build_docs.yml | 16 +++------------- docs/requirements.txt | 15 --------------- docs/source/conf.py | 11 ----------- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index e92c556218..c7ac61d1f5 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -59,12 +59,6 @@ jobs: echo "::endgroup::" echo "::group::Install PyTorch" - # conda install \ - # --yes \ - # --quiet \ - # -c "pytorch-${CHANNEL}" \ - # -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${CU_VERSION}*"] \ - # "${CUDATOOLKIT}" 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}" @@ -75,19 +69,15 @@ jobs: conda install --quiet --yes cmake>=3.18.0 ninja pip3 install --progress-bar off -v -e . --no-use-pep517 + # TODO: Need to rely on torchcodec instead of building ffmpeg from source. echo "::endgroup::" echo "::group::Build FFmpeg" .github/scripts/ffmpeg/build_gpu.sh echo "::endgroup::" echo "::group::Install other dependencies" - conda install \ - --quiet --yes \ - -c conda-forge \ - sox libvorbis pandoc doxygen pysoundfile - pip install --progress-bar off \ - git+https://github.com/kpu/kenlm/ flashlight-text \ - -r docs/requirements.txt -r docs/requirements-tutorials.txt + + pip install --progress-bar off -r docs/requirements.txt -r docs/requirements-tutorials.txt echo "::endgroup::" echo "::group::Build documentation" diff --git a/docs/requirements.txt b/docs/requirements.txt index 8522161f40..cc522077bc 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,9 +2,6 @@ Jinja2<3.1.0 matplotlib<=3.8 pyparsing<3,>=2.0.2 -# C++ docs -breathe==4.34.0 - # Note: # When changing Sphinx-related packages, make sure that the custom behaviors in the following # locations are working as expected. @@ -17,15 +14,3 @@ sphinxcontrib.katex==0.8.6 sphinxcontrib.bibtex sphinx_gallery==0.11.1 nbsphinx==0.8.8 - -# https://github.com/bmcfee/resampy/issues/106 -# Since 2022-07-07 build_docs CI job started to fail. -# Pinning resampy to 0.2.2 resolves this. -# The real cause is not know at the moment but the use -# of librosa seems to cause this -# https://github.com/bmcfee/resampy/issues/106 -# In our case, the tutorial timed out is online_asr_tutorial, -# which itself does not use resampy -# However audio_feature_augmentation_tutorial is executed before that, -# which uses librosa. -resampy==0.2.2 diff --git a/docs/source/conf.py b/docs/source/conf.py index febd4c38fd..777e9b68f7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,19 +53,8 @@ "sphinxcontrib.bibtex", "sphinx_gallery.gen_gallery", "nbsphinx", - "breathe", ] -breathe_projects = {"libtorio": "cpp/xml"} - -breathe_default_project = "libtorio" - -breathe_projects_source = { - "libtorio": ( - "../../src/libtorio/ffmpeg/", - ["stream_reader/stream_reader.h", "stream_writer/stream_writer.h"], - ) -} nbsphinx_requirejs_path = "" From 8944a23fe6c1177e016be9527cba43c845a7e9d3 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 14 Aug 2025 09:54:28 +0100 Subject: [PATCH 2/7] fix --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 2df69cae31..fd3f719262 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,7 +24,7 @@ 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 +# doxygen source/Doxyfile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @python post_process_dispatcher.py $(BUILDDIR) From 1b76183d34519806342cf45b945ff07fb469e355 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Thu, 14 Aug 2025 15:19:25 +0000 Subject: [PATCH 3/7] Add decoder to autodoc_mock_imports --- docs/source/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 777e9b68f7..0c8ad6776c 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,6 +59,7 @@ nbsphinx_requirejs_path = "" autodoc_member_order = "bysource" +autodoc_mock_imports = ['torchaudio.models.decoder'] # katex options # From 9661b9bf22da4ceb91f641f57147855eba6a4ab4 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Thu, 14 Aug 2025 16:26:22 +0000 Subject: [PATCH 4/7] Disable all ctc_decoder tutorials --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0c8ad6776c..aa7e15cb30 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -111,7 +111,7 @@ def _get_pattern(): } ret = {"filename_pattern": "tutorial.py"} - no_build = r"/examples/tutorials/asr_inference_with_cuda_ctc_decoder_tutorial.py" + no_build = r".*ctc_decoder_tutorial.py" if os.getenv("GALLERY_PATTERN"): # See https://github.com/pytorch/tutorials/blob/cbf2238df0e78d84c15bd94288966d2f4b2e83ae/conf.py#L75-L83 ret["ignore_pattern"] = r"(/(?!" + re.escape(os.getenv("GALLERY_PATTERN")) + r")[^/]+$)" From e00a947990ec3827c428417895d30f48c40c03b2 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Thu, 14 Aug 2025 16:44:08 +0000 Subject: [PATCH 5/7] Install numpy first --- .github/scripts/unittest-linux/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/unittest-linux/install.sh b/.github/scripts/unittest-linux/install.sh index 3e041908c4..a95c33c101 100755 --- a/.github/scripts/unittest-linux/install.sh +++ b/.github/scripts/unittest-linux/install.sh @@ -75,7 +75,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 torchcodec --index-url="${PYTORCH_WHEEL_INDEX}" - +pip install "numpy>=1.26" # 2. Install torchaudio conda install --quiet -y ninja cmake @@ -99,5 +99,5 @@ fi ( set -x conda install -y -c conda-forge ${NUMBA_DEV_CHANNEL} parameterized 'requests>=2.20' - pip install coverage pytest pytest-cov scipy expecttest scipy "numpy>=1.26" + pip install coverage pytest pytest-cov scipy expecttest scipy ) From 93a8b0d2973999082571890ff7b86a274215981d Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Thu, 14 Aug 2025 18:22:23 +0000 Subject: [PATCH 6/7] Remove torchcodec version check --- .github/scripts/unittest-linux/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/scripts/unittest-linux/install.sh b/.github/scripts/unittest-linux/install.sh index b195f10f20..aa562563a7 100755 --- a/.github/scripts/unittest-linux/install.sh +++ b/.github/scripts/unittest-linux/install.sh @@ -54,6 +54,5 @@ pip install . -v --no-build-isolation printf "* Installing test tools\n" # On this CI, for whatever reason, we're only able to install ffmpeg 4. conda install -y "ffmpeg<5" -python -c "import torch; import torchaudio; import torchcodec; print(torch.__version__, torchaudio.__version__, torchcodec.__version__)" pip3 install parameterized requests coverage pytest pytest-cov scipy expecttest From 4595e0d56dfd6a0b1e7f508c0913ad44f64b8832 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Mon, 18 Aug 2025 17:11:38 +0000 Subject: [PATCH 7/7] Try reversion of change to numpy install order --- .github/scripts/unittest-linux/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/scripts/unittest-linux/install.sh b/.github/scripts/unittest-linux/install.sh index 31a2f7c949..c04e9747d0 100755 --- a/.github/scripts/unittest-linux/install.sh +++ b/.github/scripts/unittest-linux/install.sh @@ -40,7 +40,6 @@ case $GPU_ARCH_TYPE in ;; esac PYTORCH_WHEEL_INDEX="https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/${GPU_ARCH_ID}" -pip install "numpy>=1.26" pip install --progress-bar=off --pre torch --index-url="${PYTORCH_WHEEL_INDEX}" @@ -56,4 +55,4 @@ printf "* Installing test tools\n" # On this CI, for whatever reason, we're only able to install ffmpeg 4. conda install -y "ffmpeg<5" -pip3 install parameterized requests coverage pytest pytest-cov scipy expecttest +pip3 install parameterized requests coverage pytest pytest-cov scipy numpy expecttest