Skip to content

Remove dependencies from doc job #4043

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 10 commits into from
Aug 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 0 additions & 15 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
14 changes: 2 additions & 12 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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")[^/]+$)"
Expand Down
Loading