Skip to content

docs(quant_api): fix RST warnings in FqnToConfig and Int8DynamicActivationIntxWeightConfig docstrings (#3863) - #4475

Merged
andrewor14 merged 1 commit into
pytorch:mainfrom
Anai-Guo:fix-docstring-rst-fqntoconfig-int8intx
Jun 12, 2026
Merged

docs(quant_api): fix RST warnings in FqnToConfig and Int8DynamicActivationIntxWeightConfig docstrings (#3863)#4475
andrewor14 merged 1 commit into
pytorch:mainfrom
Anai-Guo:fix-docstring-rst-fqntoconfig-int8intx

Conversation

@Anai-Guo

@Anai-Guo Anai-Guo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Resolves several Sphinx doc-build warnings tracked in #3863, in two quant_api.py docstrings.

Int8DynamicActivationIntxWeightConfig

  • Fix a stray-backtick typo in the weight_granularity arg (a backtick preceded a leading space, breaking the inline-literal markup).
  • Add the blank line required before (and after) the intx_packing_format sub-bullet list, which fixed Definition list ends without a blank line; unexpected unindent.

FqnToConfig

  • Reflow the fqn_to_config arg body into valid RST: the (1)/(2)/(3) enumerated list and the * precedence bullet list previously had no preceding blank line and inconsistent indentation, producing Unexpected indentation and Block quote ends without a blank line; unexpected unindent. Converted to a proper numbered list + bullet list with blank-line separators and aligned continuation lines.

Wording, regex examples, and backtick style are preserved; only the RST structure/indentation changed. No code or behavior changes.

🤖 Generated with Claude Code

@pytorch-bot

pytorch-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4475

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 Awaiting Approval, 2 New Failures, 2 Unclassified Failures

As of commit 00a8f65 with merge base 28e6aca (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 11, 2026
@andrewor14

Copy link
Copy Markdown
Contributor

@claude review

@claude

claude Bot commented Jun 12, 2026

Copy link
Copy Markdown

Claude finished @andrewor14's task in 1m 7s —— View job


Code Review

I reviewed the docstring changes in torchao/quantization/quant_api.py. This is a clean, well-scoped docs-only fix.

  • Read PR diff and the affected docstrings
  • Validate RST structure of both docstrings
  • Check for behavior/code changes (none)

Verdict: LGTM ✅ — the RST fixes are correct and the warnings should be resolved.

Int8DynamicActivationIntxWeightConfig (lines 358–371)

  • The stray-backtick typo on weight_granularity (` weight_granularity``weight_granularity`) is fixed and now aligns with the other args. ✅
  • The blank lines added before and after the intx_packing_format bullet list (lines 366, 369) are exactly what RST needs to terminate the surrounding definition/field text and start/end the bullet list — this is the standard fix for "Definition list ends without a blank line; unexpected unindent."

FqnToConfig (lines 1506–1528)

  • The (1)/(2)/(3) block is now a proper 1./2./3. enumerated list with a preceding blank line and aligned 3-space continuation indents (e.g. start with prefix "re:" under item 2). ✅
  • The precedence * bullet list now has a preceding blank line and consistent 2-space continuation indentation. ✅
  • Wording, regex examples, and the re: escapes are preserved verbatim — good, this keeps the change purely structural. ✅

Minor / optional (pre-existing, not introduced here)

  • These docstrings wrap inline code/identifiers in single backticks (`weight_dtype`). In RST, single backticks resolve to the default title-reference role (rendered italic), not inline literal — double backticks ( weight_dtype ) would be the literal-code rendering. Since the PR explicitly preserves backtick style and the surrounding docstrings are consistent in using single backticks, this is fine to leave as-is and out of scope for a warning-fix PR. Worth a follow-up if the team wants true monospaced rendering.
  • Cosmetic: Int8DynamicActivationIntxWeightConfig uses lowercase args: while FqnToConfig uses Args:. Not related to this PR; just noting the inconsistency.

Nice, surgical fix. No code or behavior changes, and the indentation/blank-line corrections directly target the reported Sphinx warnings.
• branch fix-docstring-rst-fqntoconfig-int8intx

@andrewor14 andrewor14 added the topic: documentation Use this tag if this PR adds or improves documentation label Jun 12, 2026
@andrewor14
andrewor14 merged commit c42673d into pytorch:main Jun 12, 2026
11 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: documentation Use this tag if this PR adds or improves documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants