Skip to content

Commit 4212a48

Browse files
fix(docs): preserve MDX model-name allowlist comments
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
1 parent f54dbc1 commit 4212a48

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎docs/fern/versions/nightly/pages/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
## Overview
5757

58-
NeMo Megatron Bridge is a PyTorch-native library within the [NeMo Framework](https://github.com/NVIDIA-NeMo) that provides pretraining, SFT, and LoRA for popular language, vision-language, audio, and multimodal models. It serves as a powerful **bridge, conversion, and verification layer** between 🤗 Hugging Face and [Megatron Core](https://github.com/NVIDIA/Megatron-LM/tree/main/megatron/core). It provides bidirectional checkpoint conversion between these formats, enabling other projects to leverage Megatron Core's parallelism capabilities or export models for various inference engines. The bridge includes built-in verification mechanisms to ensure conversion accuracy and checkpoint integrity across different model formats.
58+
NeMo Megatron Bridge is a PyTorch-native library within the [NeMo Framework](https://github.com/NVIDIA-NeMo) that provides pretraining, SFT and LoRA for popular language, vision-language, audio, and multimodal models. It serves as a powerful **bridge, conversion, and verification layer** between 🤗 Hugging Face and [Megatron Core](https://github.com/NVIDIA/Megatron-LM/tree/main/megatron/core). It provides bidirectional checkpoint conversion between these formats, enabling other projects to leverage Megatron Core's parallelism capabilities or export models for various inference engines. The bridge includes built-in verification mechanisms to ensure conversion accuracy and checkpoint integrity across different model formats.
5959

6060
On top of the bridge, NeMo Megatron Bridge provides a performant and scalable PyTorch-native training loop that leverages [Megatron Core](https://github.com/NVIDIA/Megatron-LM/tree/main/megatron/core) to deliver state-of-the-art training throughput. It supports pretraining and fine-tuning with features like tensor and pipeline parallelism, and mixed precision (FP8, BF16, FP4, etc.). Users can either use existing 🤗 Hugging Face models or define custom PyTorch model definitions for flexible end-to-end workflows.
6161

‎docs/fern/versions/nightly/pages/models/README.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ Choose a model to inspect its recorded import/export, training, and precision co
128128
<span class="verification-status verification-status--verified" title="Verified">✓ Verified</span>
129129
</a>
130130
<a class="verification-model-link" href="nemotron/nemotron3-super#verified-nemotron-3-super-120b-a12b">
131-
<strong title="nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16">NVIDIA-Nemotron-3-Super-120B-A12B-BF16</strong> {/* pragma: allowlist secret */}
131+
<strong title="nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16">NVIDIA-Nemotron-3-Super-120B-A12B-BF16</strong> {/* pragma: allowlist secret */
132+
}
132133
<span class="verification-status verification-status--partial" title="Partial">◐ Partial</span>
133134
</a>
134135
<a class="verification-model-link" href="nemotron/nemotron3-ultra#verified-nemotron-3-ultra-550b-a55b">
135-
<strong title="nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16">NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16</strong> {/* pragma: allowlist secret */}
136+
<strong title="nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16">NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16</strong> {/* pragma: allowlist secret */
137+
}
136138
<span class="verification-status verification-status--partial" title="Partial">◐ Partial</span>
137139
</a>
138140
<a class="verification-model-link" href="nemotron/nemotron3.5-lightning#verified-nemotron-3.5-lightning">

‎scripts/docs/generate_model_verification_catalog.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,10 @@ def _model_directory(catalog: dict[str, object], repo_root: Path, *, fern: bool)
552552
status = _directory_status(entries)
553553
allowlist_suffix = ""
554554
if model_name in DETECT_SECRETS_ALLOWLIST_MODEL_NAMES:
555+
# detect-secrets requires the comment terminator at end of line.
556+
# Keep the MDX closing brace on the next line; Sphinx is unchanged.
555557
allowlist_suffix = (
556-
" {/* pragma: allowlist secret */}" if fern else " <!-- pragma: allowlist secret -->"
558+
" {/* pragma: allowlist secret */\n }" if fern else " <!-- pragma: allowlist secret -->"
557559
)
558560
lines.extend(
559561
[

‎tests/unit_tests/doc_consistency/test_model_verification_catalog.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_generated_comments_match_output_format(generator: ModuleType, catalog:
360360
section = generator.render_model_section([_models(catalog)["qwen3-30b-a3b"]], fern=fern)
361361
if fern:
362362
assert directory.startswith(generator.FERN_GENERATED_NOTICE)
363-
assert "{/* pragma: allowlist secret */}" in directory
363+
assert "{/* pragma: allowlist secret */\n }" in directory
364364
assert section.startswith(generator.FERN_MODEL_SECTION_START)
365365
assert section.rstrip().endswith(generator.FERN_MODEL_SECTION_END)
366366
assert "<!--" not in directory + section

0 commit comments

Comments
 (0)