Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:NVIDIA NeMo Curator Docs Configuration

From Leeroopedia
Revision as of 13:20, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/NVIDIA_NeMo_Curator_Docs_Configuration.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Documentation, Configuration, Sphinx
Last Updated 2026-02-14 00:00 GMT

Overview

Sphinx documentation configuration file that defines all build settings for the NeMo Curator documentation site, including extensions, theme configuration, autodoc2 API generation, MyST parser settings, and intersphinx cross-references.

Description

The conf.py file is the central configuration controlling how the NeMo Curator documentation is parsed, rendered, and themed for publication on the NVIDIA docs site. It configures the following areas:

Project Metadata: Sets the project name to "NeMo-Curator", the copyright to "2025, NVIDIA Corporation", the author to "NVIDIA Corporation", and the release version to "26.02".

Extensions: Loads a comprehensive set of Sphinx extensions:

  • myst_parser for Markdown documentation support
  • sphinx.ext.viewcode for source code viewing links
  • sphinx.ext.doctest for docstring testing
  • sphinx.ext.napoleon for Google-style docstring support
  • sphinx_copybutton for code block copy buttons
  • sphinx_design for grid layouts
  • sphinx.ext.ifconfig for conditional content
  • content_gating (custom) for unified content gating
  • myst_codeblock_substitutions (custom) for MyST code block substitutions
  • json_output (custom) for JSON search index generation
  • search_assets (custom) for enhanced search
  • rich_metadata (custom) for SEO metadata injection
  • sphinxcontrib.mermaid for Mermaid diagram rendering
  • autodoc2 (conditional) for API documentation generation

MyST Parser Configuration: Enables extensions for dollar math, AMS math, colon fences, definition lists, field lists, task lists, inline attributes, substitutions, HTML admonitions, and HTML images. Defines reusable substitution variables including product name, version, company, GitHub repo URL, minimum Python version, and recommended CUDA version.

Autodoc2 Configuration: Conditionally enabled when package directories exist. Generates API documentation from five package trees: backends, pipeline, stages, tasks, and utils. Configures hidden objects (dunder, private, inherited), skipped module patterns (tests, conftest, private modules, scripts), and type annotation replacements for readability (e.g., pandas.core.frame.DataFrame becomes pd.DataFrame).

Intersphinx: Maps cross-references to external NVIDIA documentation including Container Toolkit, GPU Operator, NeMo Guardrails, various NIM projects, and the NVIDIA driver installation guide.

HTML Theme: Uses the nvidia_sphinx_theme with version switcher support, a GitHub icon link, and Adobe analytics tracking scripts.

Usage

This file is consumed by Sphinx during documentation builds. It is invoked automatically when running sphinx-build or make html from the docs/ directory. Developers modifying the documentation site structure, adding new extensions, or changing the build behavior should edit this file.

Code Reference

Source Location

Signature

# Key configuration variables
project = "NeMo-Curator"
release = "26.02"
extensions = [
    "myst_parser",
    "sphinx.ext.viewcode",
    "sphinx.ext.napoleon",
    "sphinx_copybutton",
    "sphinx_design",
    "sphinxcontrib.mermaid",
    # ... plus custom extensions
]
html_theme = "nvidia_sphinx_theme"

# Autodoc2 packages (conditionally loaded)
autodoc2_packages_list = [
    "../nemo_curator/backends",
    "../nemo_curator/pipeline",
    "../nemo_curator/stages",
    "../nemo_curator/tasks",
    "../nemo_curator/utils",
]

Import

import os
import sys

I/O Contract

Inputs

Name Type Required Description
extensions list[str] Yes Sphinx extension modules to load during the build
autodoc2_packages_list list[str] No Relative paths to Python packages for API doc generation
myst_substitutions dict No Reusable variables available in MyST Markdown files
intersphinx_mapping dict No External documentation sites for cross-referencing
html_theme_options dict No Theme-specific settings including version switcher and icon links

Outputs

Name Type Description
HTML documentation directory Rendered documentation site in docs/_build/html
API docs directory Auto-generated API reference files in docs/apidocs/
JSON search index file Search index generated by the json_output extension

Usage Examples

Building the Documentation

# Build HTML documentation from the docs directory
cd docs
sphinx-build -b html . _build/html

# Or using make
make html

Using MyST Substitutions in Docs

<!-- In any .md file under docs/ -->
Welcome to {{product_name}} version {{version}}.
The minimum Python version required is {{min_python_version}}.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment