diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index f681e3b7ec..effc44ced5 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/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) 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..aa7e15cb30 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -53,23 +53,13 @@ "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 = "" autodoc_member_order = "bysource" +autodoc_mock_imports = ['torchaudio.models.decoder'] # katex options # @@ -121,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")[^/]+$)"