pytorch - 💡(How to fix) Fix [Docathon-TEST] Document `distributed.checkpoint.default_planner` public APIs (4)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

"create_default_global_load_plan",
    "create_default_global_save_plan",
    "create_default_local_save_plan",

---

"DefaultLoadPlanner",

---



---



---



---



---



---



---

cd docs
pip install -r requirements.txt  # first time only
make coverage   # Confirm your APIs no longer show as undocumented
make html       # Build the docs and check rendering
RAW_BUFFERClick to expand / collapse

Document torch.distributed.checkpoint.default_planner Public APIs

Difficulty: 🟡 Medium APIs to document: 4 (3 functions, 1 classes) Doc file: docs/source/distributed.checkpoint.md Config file: docs/source/conf.py

Background

PyTorch's documentation coverage skip lists in docs/source/conf.py contain public APIs that are not yet surfaced in the official docs. This issue tracks adding Sphinx autodoc directives for the torch.distributed.checkpoint.default_planner APIs so they appear in the rendered documentation.

APIs to Document

Functions:

  • create_default_global_load_plan
  • create_default_global_save_plan
  • create_default_local_save_plan

Classes:

  • DefaultLoadPlanner

Where to Make Changes

1. Remove entries from docs/source/conf.py

Find the # torch.distributed.checkpoint.default_planner comment section and remove these entries:

From coverage_ignore_functions in docs/source/conf.py:

    "create_default_global_load_plan",
    "create_default_global_save_plan",
    "create_default_local_save_plan",

From coverage_ignore_classes in docs/source/conf.py:

    "DefaultLoadPlanner",

2. Add Sphinx directives to docs/source/distributed.checkpoint.md

Placement: Find the line containing .. automodule:: torch.distributed.checkpoint (line 26) and add your directives after this section. You will need to add a currentmodule directive since torch.distributed.checkpoint.default_planner doesn't have one yet.

Add the following directives:

```{eval-rst}
.. currentmodule:: torch.distributed.checkpoint.default_planner
.. autofunction:: create_default_global_load_plan
.. autofunction:: create_default_global_save_plan
.. autofunction:: create_default_local_save_plan
.. autoclass:: DefaultLoadPlanner
  :members:

### How to Verify

```bash
cd docs
pip install -r requirements.txt  # first time only
make coverage   # Confirm your APIs no longer show as undocumented
make html       # Build the docs and check rendering

Open docs/build/html/ in a browser and navigate to your newly documented APIs.

PR Requirements

Tips & Pitfalls

  • .rst vs .md files: RST files use directives directly. Markdown (.md) files need each directive wrapped in a ```{eval-rst} fence.
  • currentmodule scope: Every .. autofunction:: name resolves against the most recent .. currentmodule:: above it. Make sure your directive is under the correct one.
  • :members: for classes: Add :members: to autoclass directives to include documented methods.
  • PR preview: After pushing, your docs render at https://docs-preview.pytorch.org/pytorch/pytorch/<pr_number>/index.html

🤖 Optional: Claude Code Skill

This repo includes a Claude skill at .claude/skills/document-public-apis/SKILL.md that can assist with this workflow.

References

extent analysis

TL;DR

Remove entries from the skip list in docs/source/conf.py and add Sphinx directives to docs/source/distributed.checkpoint.md to document the torch.distributed.checkpoint.default_planner APIs.

Guidance

  1. Remove skip list entries: Delete the specified function and class names from coverage_ignore_functions and coverage_ignore_classes in docs/source/conf.py.
  2. Add Sphinx directives: Insert the provided directives after the .. automodule:: torch.distributed.checkpoint line in docs/source/distributed.checkpoint.md, including .. currentmodule:: and directives for each function and class.
  3. Verify documentation: Run make coverage and make html in the docs directory to confirm the APIs are no longer listed as undocumented and to check the rendered documentation.
  4. Include screenshot in PR: Add a screenshot of the rendered documentation to the PR description to demonstrate the changes.

Example

# In docs/source/conf.py, remove these lines:
"create_default_global_load_plan",
"create_default_global_save_plan",
"create_default_local_save_plan",
"DefaultLoadPlanner",
# In docs/source/distributed.checkpoint.md, add these directives:
```{eval-rst}
.. currentmodule:: torch.distributed.checkpoint.default_planner
.. autofunction:: create_default_global_load_plan
.. autofunction:: create_default_global_save_plan
.. autofunction:: create_default_local_save_plan
.. autoclass:: DefaultLoadPlanner
  :members:

## Notes
This solution assumes the provided directives are correct and sufficient for documenting the specified APIs. If issues arise during verification, review the directives and API documentation for accuracy.

## Recommendation
Apply the workaround by removing the skip list entries and adding the Sphinx directives as described, and then verify the documentation to ensure the changes are correct and complete.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix [Docathon-TEST] Document `distributed.checkpoint.default_planner` public APIs (4)