From fa4ac14590d411c68b47594255d2c76b8e9114a3 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 00:23:06 +0400 Subject: [PATCH 01/16] Explicitly list requirements for building docs on CI Signed-off-by: Vladimir Bataev --- .github/workflows/build-docs.yml | 3 ++- requirements/requirements_docs_ci.txt | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 requirements/requirements_docs_ci.txt diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 45f9e80941ab..3ae426e5d7ad 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -42,7 +42,8 @@ jobs: uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.80.2 with: docs-directory: docs/source - sync-all: true + sync-all: false + requirements-file: requirements/requirements_docs_ci.txt build-docs-summary: needs: [pre-flight, build-docs] diff --git a/requirements/requirements_docs_ci.txt b/requirements/requirements_docs_ci.txt new file mode 100644 index 000000000000..41338afde545 --- /dev/null +++ b/requirements/requirements_docs_ci.txt @@ -0,0 +1,15 @@ +# requirements for building docs on CI +-r requirements.txt +-r requirements_asr.txt +-r requirements_audio.txt +-r requirements_common.txt +-r requirements_docs.txt +-r requirements_lightning.txt +-r requirements_run.txt +-r requirements_slu.txt +-r requirements_tts.txt + +# excluded requirements: +# -r requirements_test.txt +# -r requirements_cu12.txt +# -r requirements_cu13.txt From d57e8576b3d906b9bd0cefe94c4eec813de7ccf5 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 00:26:49 +0400 Subject: [PATCH 02/16] Fix typo to trigger docs pipeline Signed-off-by: Vladimir Bataev --- docs/source/asr/datasets.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/asr/datasets.rst b/docs/source/asr/datasets.rst index edf4205fd78a..69c0083b2bc7 100644 --- a/docs/source/asr/datasets.rst +++ b/docs/source/asr/datasets.rst @@ -1067,7 +1067,7 @@ One such example are attention encoder-decoder models, where the overall GPU mem into two main components: input-sequence-length bound (encoder activations) and output-sequence-length bound (decoder activations). Classical bucketing techniques only stratify on the input sequence length (e.g. duration in speech), -which leverages encoder effectively but leads to excessive padding on on decoder's side. +which leverages encoder effectively but leads to excessive padding on decoder's side. To amend this we support a 2D bucketing technique which estimates the buckets in two stages. The first stage is identical to 1D bucketing, i.e. we determine the input-sequence bucket bins so that From 1ff93697b109705e32fbbb4fc0caca6017a2457f Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 00:31:12 +0400 Subject: [PATCH 03/16] Add cu12 requirements Signed-off-by: Vladimir Bataev --- requirements/requirements_docs_ci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_docs_ci.txt b/requirements/requirements_docs_ci.txt index 41338afde545..3a020a562615 100644 --- a/requirements/requirements_docs_ci.txt +++ b/requirements/requirements_docs_ci.txt @@ -8,8 +8,8 @@ -r requirements_run.txt -r requirements_slu.txt -r requirements_tts.txt +-r requirements_cu12.txt # excluded requirements: # -r requirements_test.txt -# -r requirements_cu12.txt # -r requirements_cu13.txt From 42d54895c5ad8ccce1300518dc78d032e0350717 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 00:35:10 +0400 Subject: [PATCH 04/16] Fix docs requirements Signed-off-by: Vladimir Bataev --- requirements/requirements_docs.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/requirements/requirements_docs.txt b/requirements/requirements_docs.txt index ff3ec5202b0e..2033edfc5161 100644 --- a/requirements/requirements_docs.txt +++ b/requirements/requirements_docs.txt @@ -3,10 +3,15 @@ Jinja2 latexcodec numpy pydata-sphinx-theme -Sphinx +sphinx>=8.1.3 sphinx-book-theme -sphinx-copybutton +sphinx-copybutton>=0.5.2 sphinxcontrib-bibtex sphinxext-opengraph +sphinx-autobuild>=2024.10.3 +sphinx-autodoc2>=0.5.0 +sphinxcontrib-mermaid urllib3 wrapt +myst-parser>=4.0.1 +nvidia-sphinx-theme>=0.0.8 From 45651078119b4f826597fc63309b33aa0de75ccb Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 00:37:12 +0400 Subject: [PATCH 05/16] Add change to trigger docs pipeline Signed-off-by: Vladimir Bataev --- .../legacy_language_modeling_and_customization.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst index 5a2265a39757..970da70e0afb 100644 --- a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst +++ b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst @@ -58,7 +58,6 @@ It can evaluate a model in the following three modes by setting the argument ``- In ``beamsearch`` mode, the evaluation is performed using beam search decoding without any language model. The performance is reported in terms of Word Error Rate (WER) and Character Error Rate (CER). Moreover, when the best candidate is selected among the candidates, it is also reported as the best WER/CER. This can serve as an indicator of the quality of the predicted candidates. - The script initially loads the ASR model and predicts the outputs of the model's encoder as log probabilities. This part is computed in batches on a device specified by --device, which can be either a CPU (`--device=cpu`) or a single GPU (`--device=cuda:0`). The batch size for this part is specified by ``--acoustic_batch_size``. Using the largest feasible batch size can speed up the calculation of log probabilities. Additionally, you can use `--use_amp` to accelerate the calculation and allow for larger --acoustic_batch_size values. Currently, multi-GPU support is not available for calculating log probabilities. However, using ``--probs_cache_file`` can help. This option stores the log probabilities produced by the model's encoder in a pickle file, allowing you to skip the first step in future runs. From 333af2e62489dd04f01a386a60bd177691a2281a Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:19:51 +0400 Subject: [PATCH 06/16] Revert unnecessary change Signed-off-by: Vladimir Bataev --- .../legacy_language_modeling_and_customization.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst index 970da70e0afb..5a2265a39757 100644 --- a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst +++ b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst @@ -58,6 +58,7 @@ It can evaluate a model in the following three modes by setting the argument ``- In ``beamsearch`` mode, the evaluation is performed using beam search decoding without any language model. The performance is reported in terms of Word Error Rate (WER) and Character Error Rate (CER). Moreover, when the best candidate is selected among the candidates, it is also reported as the best WER/CER. This can serve as an indicator of the quality of the predicted candidates. + The script initially loads the ASR model and predicts the outputs of the model's encoder as log probabilities. This part is computed in batches on a device specified by --device, which can be either a CPU (`--device=cpu`) or a single GPU (`--device=cuda:0`). The batch size for this part is specified by ``--acoustic_batch_size``. Using the largest feasible batch size can speed up the calculation of log probabilities. Additionally, you can use `--use_amp` to accelerate the calculation and allow for larger --acoustic_batch_size values. Currently, multi-GPU support is not available for calculating log probabilities. However, using ``--probs_cache_file`` can help. This option stores the log probabilities produced by the model's encoder in a pickle file, allowing you to skip the first step in future runs. From 45b37aa4787bf43703fdaa704e310cd40e71280b Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:20:05 +0400 Subject: [PATCH 07/16] Trigger pipeline if the pipeline itself changed Signed-off-by: Vladimir Bataev --- .github/workflows/build-docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 3ae426e5d7ad..29cc50e72b85 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -21,12 +21,14 @@ on: - r** paths: - "docs/**" + - ".github/workflows/build-docs.yml" push: branches: - main - r** paths: - "docs/**" + - ".github/workflows/build-docs.yml" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event.label.name || 'main' }}-${{ github.event_name }} From a768713e63766eb04f9def5e4174e12929454c88 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:30:16 +0400 Subject: [PATCH 08/16] Exclude numba from requirements Signed-off-by: Vladimir Bataev --- requirements/requirements_docs_ci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_docs_ci.txt b/requirements/requirements_docs_ci.txt index 3a020a562615..ad7027eee854 100644 --- a/requirements/requirements_docs_ci.txt +++ b/requirements/requirements_docs_ci.txt @@ -8,8 +8,8 @@ -r requirements_run.txt -r requirements_slu.txt -r requirements_tts.txt --r requirements_cu12.txt # excluded requirements: # -r requirements_test.txt +-r requirements_cu12.txt # -r requirements_cu13.txt From a89174bd431b9d153f634f32d78e0810b084c2de Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:30:30 +0400 Subject: [PATCH 09/16] Fix Signed-off-by: Vladimir Bataev --- requirements/requirements_docs_ci.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements_docs_ci.txt b/requirements/requirements_docs_ci.txt index ad7027eee854..41338afde545 100644 --- a/requirements/requirements_docs_ci.txt +++ b/requirements/requirements_docs_ci.txt @@ -11,5 +11,5 @@ # excluded requirements: # -r requirements_test.txt --r requirements_cu12.txt +# -r requirements_cu12.txt # -r requirements_cu13.txt From a94813b1e88bc97ae79840536c525127a751a702 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:31:10 +0400 Subject: [PATCH 10/16] Edit to trigger pipeline Signed-off-by: Vladimir Bataev --- .../legacy_language_modeling_and_customization.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst index 5a2265a39757..970da70e0afb 100644 --- a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst +++ b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst @@ -58,7 +58,6 @@ It can evaluate a model in the following three modes by setting the argument ``- In ``beamsearch`` mode, the evaluation is performed using beam search decoding without any language model. The performance is reported in terms of Word Error Rate (WER) and Character Error Rate (CER). Moreover, when the best candidate is selected among the candidates, it is also reported as the best WER/CER. This can serve as an indicator of the quality of the predicted candidates. - The script initially loads the ASR model and predicts the outputs of the model's encoder as log probabilities. This part is computed in batches on a device specified by --device, which can be either a CPU (`--device=cpu`) or a single GPU (`--device=cuda:0`). The batch size for this part is specified by ``--acoustic_batch_size``. Using the largest feasible batch size can speed up the calculation of log probabilities. Additionally, you can use `--use_amp` to accelerate the calculation and allow for larger --acoustic_batch_size values. Currently, multi-GPU support is not available for calculating log probabilities. However, using ``--probs_cache_file`` can help. This option stores the log probabilities produced by the model's encoder in a pickle file, allowing you to skip the first step in future runs. From 73562767dd3df22caa234d62e55a9ed6b2b05e35 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 01:41:33 +0400 Subject: [PATCH 11/16] Try fix numba Signed-off-by: Vladimir Bataev --- nemo/utils/model_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nemo/utils/model_utils.py b/nemo/utils/model_utils.py index ebff99d6c160..2ee6241e30b7 100644 --- a/nemo/utils/model_utils.py +++ b/nemo/utils/model_utils.py @@ -652,7 +652,10 @@ def check_lib_version(lib_name: str, checked_version: str, operator) -> Tuple[Op f"Could not check version compatibility." ) return False, msg - except (AttributeError, ImportError, ModuleNotFoundError): + except (AttributeError, ImportError, ModuleNotFoundError, TypeError): + # TypeError: some libraries (e.g. numba) can crash during import due to + # incompatible transitive dependencies (e.g. numba + coverage version mismatch). + # Treat such broken imports the same as missing libraries. pass msg = f"Lib {lib_name} has not been installed. Please use pip or conda to install this package." From a40371ec4c6e0582da9fa089f276158a546109c6 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 19:56:11 +0400 Subject: [PATCH 12/16] Inline template to debug Signed-off-by: Vladimir Bataev --- .github/workflows/build-docs.yml | 121 +++++++++++++++++++++++++++++-- 1 file changed, 116 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 29cc50e72b85..543c76d3b697 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -41,11 +41,122 @@ jobs: build-docs: needs: [pre-flight] if: needs.pre-flight.outputs.is_deployment_workflow != 'true' - uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.80.2 - with: - docs-directory: docs/source - sync-all: false - requirements-file: requirements/requirements_docs_ci.txt +# uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.80.2 +# with: +# docs-directory: docs/source +# sync-all: false +# requirements-file: requirements/requirements_docs_ci.txt + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: "recursive" + ref: ${{ github.sha }} + fetch-depth: 0 + + - name: Install uv + uses: astral-sh/setup-uv@v5 + + - name: Install dependencies + run: | + uv venv + uv pip install -r requirements/requirements_docs_ci.txt + + - name: Debug - show numba and coverage versions + run: | + source .venv/bin/activate + pip show numba coverage || true + pip list | grep -iE "numba|coverage" || true + + - name: Sphinx build + run: | + source .venv/bin/activate + cd docs/source + echo "Building docs with --fail-on-warning" + sphinx-build --fail-on-warning --builder html . _build/html + + - name: Upload docs as artifact + uses: actions/upload-artifact@v4 + with: + name: docs-html + path: docs/source/_build/html + retention-days: 7 + + - name: Sphinx linkcheck + run: | + source .venv/bin/activate + cd docs/source + MAX_RETRIES=3 + RETRY_DELAY=10 + for attempt in $(seq 1 $MAX_RETRIES); do + sphinx-build --builder linkcheck . _build/linkcheck && break || true + if [ $attempt -lt $MAX_RETRIES ]; then + echo "Linkcheck attempt ${attempt}/${MAX_RETRIES} produced broken links, retrying in ${RETRY_DELAY}s..." + sleep $RETRY_DELAY + RETRY_DELAY=$((RETRY_DELAY * 2)) + fi + done + + - name: Upload linkcheck output + uses: actions/upload-artifact@v4 + with: + name: linkcheck-artifact + path: docs/source/_build/linkcheck + retention-days: 7 + + - name: Check for unknown broken links + run: | + FALSE_POSITIVES_JSON=docs/source/broken_links_false_positives.json + NEEDS_REVIEW_JSON=docs/source/broken_links_needing_review.json + LINKCHECK_JSON=docs/source/_build/linkcheck/output.json + + function check_environment { + local err=0 + if ! [ -x "$(command -v jq)" ]; then + echo "jq is required but is not found." + err=$((err + 1)) + fi + if [ ! -f "${LINKCHECK_JSON}" ]; then + echo "Did not find linkcheck output JSON file: ${LINKCHECK_JSON}." + err=$((err + 1)) + fi + if [ "${err}" -gt 0 ]; then + exit 2 + fi + } + + function check_links { + local err=0 + broken=$(jq -s 'map(select(.status=="broken"))' "$LINKCHECK_JSON") + count=$(echo "${broken}" | jq 'length') + for i in $(seq 0 $(($count - 1))) + do + entry=$(echo "${broken}" | jq ".[${i}]") + link=$(echo "${entry}" | jq -r '.uri') + local false_positive_resp="false" + local needs_review_resp="false" + if [ -f "${FALSE_POSITIVES_JSON}" ]; then + false_positive_resp=$(jq --arg check "${link}" -s 'any(.uri == $check)' < "${FALSE_POSITIVES_JSON}") + fi + if [ -f "${NEEDS_REVIEW_JSON}" ]; then + needs_review_resp=$(jq --arg check "${link}" -s 'any(.uri == $check)' < "${NEEDS_REVIEW_JSON}") + fi + + if [[ "false" = "${false_positive_resp}" && "false" = "${needs_review_resp}" ]]; then + err=$((err + 1)) + echo $entry + fi + done + + if [ "${err}" -gt 0 ]; then + echo "Found ${err} broken links that are not in exclusion lists" + exit 1 + fi + } + + check_environment + check_links build-docs-summary: needs: [pre-flight, build-docs] From cabf8719aa97aafeee7d70120c8214a655299454 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 20:02:14 +0400 Subject: [PATCH 13/16] Debug Signed-off-by: Vladimir Bataev --- .github/workflows/build-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 543c76d3b697..a2916cf7b0a8 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -66,8 +66,8 @@ jobs: - name: Debug - show numba and coverage versions run: | source .venv/bin/activate - pip show numba coverage || true - pip list | grep -iE "numba|coverage" || true + uv pip show numba coverage || true + uv pip list | grep -iE "numba|coverage" || true - name: Sphinx build run: | From 79eb997058cc43ac16e35722862dc7d033079c37 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 20:33:15 +0400 Subject: [PATCH 14/16] Ignore test requirements Signed-off-by: Vladimir Bataev --- 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 54d112cfed36..8be5942187eb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -73,7 +73,7 @@ _skipped_autodoc_mock_imports = ['wrapt', 'numpy'] for req_path in sorted(list(glob.glob("../../requirements/*.txt"))): - if "docs.txt" in req_path: + if "docs.txt" in req_path or "test.txt" in req_path: continue req_file = os.path.abspath(os.path.expanduser(req_path)) From 3cd5479144739e3cbe2a2aa4b198a21755ce2132 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 20:39:03 +0400 Subject: [PATCH 15/16] Clean up Signed-off-by: Vladimir Bataev --- .github/workflows/build-docs.yml | 121 ++------------------------ docs/source/conf.py | 1 + requirements/requirements_docs_ci.txt | 4 +- 3 files changed, 8 insertions(+), 118 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index a2916cf7b0a8..29cc50e72b85 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -41,122 +41,11 @@ jobs: build-docs: needs: [pre-flight] if: needs.pre-flight.outputs.is_deployment_workflow != 'true' -# uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.80.2 -# with: -# docs-directory: docs/source -# sync-all: false -# requirements-file: requirements/requirements_docs_ci.txt - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: "recursive" - ref: ${{ github.sha }} - fetch-depth: 0 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - - - name: Install dependencies - run: | - uv venv - uv pip install -r requirements/requirements_docs_ci.txt - - - name: Debug - show numba and coverage versions - run: | - source .venv/bin/activate - uv pip show numba coverage || true - uv pip list | grep -iE "numba|coverage" || true - - - name: Sphinx build - run: | - source .venv/bin/activate - cd docs/source - echo "Building docs with --fail-on-warning" - sphinx-build --fail-on-warning --builder html . _build/html - - - name: Upload docs as artifact - uses: actions/upload-artifact@v4 - with: - name: docs-html - path: docs/source/_build/html - retention-days: 7 - - - name: Sphinx linkcheck - run: | - source .venv/bin/activate - cd docs/source - MAX_RETRIES=3 - RETRY_DELAY=10 - for attempt in $(seq 1 $MAX_RETRIES); do - sphinx-build --builder linkcheck . _build/linkcheck && break || true - if [ $attempt -lt $MAX_RETRIES ]; then - echo "Linkcheck attempt ${attempt}/${MAX_RETRIES} produced broken links, retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY - RETRY_DELAY=$((RETRY_DELAY * 2)) - fi - done - - - name: Upload linkcheck output - uses: actions/upload-artifact@v4 - with: - name: linkcheck-artifact - path: docs/source/_build/linkcheck - retention-days: 7 - - - name: Check for unknown broken links - run: | - FALSE_POSITIVES_JSON=docs/source/broken_links_false_positives.json - NEEDS_REVIEW_JSON=docs/source/broken_links_needing_review.json - LINKCHECK_JSON=docs/source/_build/linkcheck/output.json - - function check_environment { - local err=0 - if ! [ -x "$(command -v jq)" ]; then - echo "jq is required but is not found." - err=$((err + 1)) - fi - if [ ! -f "${LINKCHECK_JSON}" ]; then - echo "Did not find linkcheck output JSON file: ${LINKCHECK_JSON}." - err=$((err + 1)) - fi - if [ "${err}" -gt 0 ]; then - exit 2 - fi - } - - function check_links { - local err=0 - broken=$(jq -s 'map(select(.status=="broken"))' "$LINKCHECK_JSON") - count=$(echo "${broken}" | jq 'length') - for i in $(seq 0 $(($count - 1))) - do - entry=$(echo "${broken}" | jq ".[${i}]") - link=$(echo "${entry}" | jq -r '.uri') - local false_positive_resp="false" - local needs_review_resp="false" - if [ -f "${FALSE_POSITIVES_JSON}" ]; then - false_positive_resp=$(jq --arg check "${link}" -s 'any(.uri == $check)' < "${FALSE_POSITIVES_JSON}") - fi - if [ -f "${NEEDS_REVIEW_JSON}" ]; then - needs_review_resp=$(jq --arg check "${link}" -s 'any(.uri == $check)' < "${NEEDS_REVIEW_JSON}") - fi - - if [[ "false" = "${false_positive_resp}" && "false" = "${needs_review_resp}" ]]; then - err=$((err + 1)) - echo $entry - fi - done - - if [ "${err}" -gt 0 ]; then - echo "Found ${err} broken links that are not in exclusion lists" - exit 1 - fi - } - - check_environment - check_links + uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_docs.yml@v0.80.2 + with: + docs-directory: docs/source + sync-all: false + requirements-file: requirements/requirements_docs_ci.txt build-docs-summary: needs: [pre-flight, build-docs] diff --git a/docs/source/conf.py b/docs/source/conf.py index 8be5942187eb..27db0419e343 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -73,6 +73,7 @@ _skipped_autodoc_mock_imports = ['wrapt', 'numpy'] for req_path in sorted(list(glob.glob("../../requirements/*.txt"))): + # NB: mocking `coverage` from test requirements results in error with `numba` if "docs.txt" in req_path or "test.txt" in req_path: continue diff --git a/requirements/requirements_docs_ci.txt b/requirements/requirements_docs_ci.txt index 41338afde545..a024d0c9c8f8 100644 --- a/requirements/requirements_docs_ci.txt +++ b/requirements/requirements_docs_ci.txt @@ -8,8 +8,8 @@ -r requirements_run.txt -r requirements_slu.txt -r requirements_tts.txt +-r requirements_cu12.txt # excluded requirements: -# -r requirements_test.txt -# -r requirements_cu12.txt # -r requirements_cu13.txt +# -r requirements_test.txt From 6f2e1dc3c1ec61408a16a33a317f91120a401174 Mon Sep 17 00:00:00 2001 From: Vladimir Bataev Date: Wed, 25 Mar 2026 20:40:17 +0400 Subject: [PATCH 16/16] Revert unnecessary changes Signed-off-by: Vladimir Bataev --- .../legacy_language_modeling_and_customization.rst | 1 + nemo/utils/model_utils.py | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst index 970da70e0afb..5a2265a39757 100644 --- a/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst +++ b/docs/source/asr/asr_customization/legacy_language_modeling_and_customization.rst @@ -58,6 +58,7 @@ It can evaluate a model in the following three modes by setting the argument ``- In ``beamsearch`` mode, the evaluation is performed using beam search decoding without any language model. The performance is reported in terms of Word Error Rate (WER) and Character Error Rate (CER). Moreover, when the best candidate is selected among the candidates, it is also reported as the best WER/CER. This can serve as an indicator of the quality of the predicted candidates. + The script initially loads the ASR model and predicts the outputs of the model's encoder as log probabilities. This part is computed in batches on a device specified by --device, which can be either a CPU (`--device=cpu`) or a single GPU (`--device=cuda:0`). The batch size for this part is specified by ``--acoustic_batch_size``. Using the largest feasible batch size can speed up the calculation of log probabilities. Additionally, you can use `--use_amp` to accelerate the calculation and allow for larger --acoustic_batch_size values. Currently, multi-GPU support is not available for calculating log probabilities. However, using ``--probs_cache_file`` can help. This option stores the log probabilities produced by the model's encoder in a pickle file, allowing you to skip the first step in future runs. diff --git a/nemo/utils/model_utils.py b/nemo/utils/model_utils.py index 2ee6241e30b7..ebff99d6c160 100644 --- a/nemo/utils/model_utils.py +++ b/nemo/utils/model_utils.py @@ -652,10 +652,7 @@ def check_lib_version(lib_name: str, checked_version: str, operator) -> Tuple[Op f"Could not check version compatibility." ) return False, msg - except (AttributeError, ImportError, ModuleNotFoundError, TypeError): - # TypeError: some libraries (e.g. numba) can crash during import due to - # incompatible transitive dependencies (e.g. numba + coverage version mismatch). - # Treat such broken imports the same as missing libraries. + except (AttributeError, ImportError, ModuleNotFoundError): pass msg = f"Lib {lib_name} has not been installed. Please use pip or conda to install this package."