Python Doc Updates: Update dependencies, remove dead code (training section). - #32424
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The nightly package feed URL is invalid, and the undocumented removal of public training pages needs resolution.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Modernizes Python API documentation dependencies and execution while narrowing published docs to inference APIs.
Changes:
- Replaces
pyquickhelperwithsphinx_exec_code. - Makes tutorial examples deterministic and executable.
- Removes training documentation and updates the publishing workflow.
File summaries
| File | Description |
|---|---|
docs/python/tutorial.rst |
Migrates executable tutorial examples. |
docs/python/requirements.txt |
Updates Sphinx dependencies. |
docs/python/ortmodule/overview.rst |
Removes ORTModule overview. |
docs/python/ortmodule/api.rst |
Removes ORTModule API reference. |
docs/python/on_device_training/training_artifacts.rst |
Removes artifact-generation documentation. |
docs/python/on_device_training/training_api.rst |
Removes training API documentation. |
docs/python/on_device_training/overview.rst |
Removes on-device training overview. |
docs/python/index.rst |
Removes training sections from navigation. |
docs/python/conf.py |
Enables sphinx_exec_code. |
docs/python/_common/onnx_sphinx.py |
Removes obsolete dependency documentation. |
.github/workflows/publish-python-apidocs.yml |
Changes runner, package source, and artifact conditions. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: eserscor <247253654+eserscor@users.noreply.github.com>
Tianlei Wu (tianleiwu)
left a comment
There was a problem hiding this comment.
Summary
Documentation-only change; the Generate Python API docs check is green at this head (build succeeded, 16 warnings). The pyquickhelper → sphinx_exec_code migration is clean and complete — I verified no dangling pyquickhelper / runpython / ORTModule / on_device_training references remain anywhere under docs/python or tools/doc, that pip install --dry-run -r docs/python/requirements.txt resolves without conflict in a clean venv, and that the # hide: start / # hide: stop markers are valid for sphinx-exec-code 0.18.
Two workflow changes look unintended, and the dependency cleanup stops short of a few remaining dead entries. Nothing blocking. Details inline.
Main points
--pre onnxruntime --index-url <ORT-Nightly>does not install a nightly — the CI log for this head resolvedonnxruntime-1.23.2(stable). PEP 440 orders the feed's1.23.0.dev*builds below the PyPI-proxied1.23.2.- The CPU-only Sphinx build was moved onto the A10 GPU pool.
workflow_dispatchremoval drops the only manual way to refresh a 10-day-retention artifact.
Out-of-diff cleanup (optional, same spirit as this PR) — docs/python/conf.py still carries dead configuration that the passing build reports:
- Lines 66-86:
html_theme_optionswritten for the pydata/RTD theme whilehtml_theme = "furo", producing 10WARNING: unsupported theme option ...messages (collapse_navigation,external_links,github_url,logo,navbar_center,navigation_depth,page_sidebar_items,show_nav_level,show_prev_next,show_toc_level). - Line 57:
html_static_path = ["_static"]→WARNING: html_static_path entry '_static' does not exist(the directory is absent). - Line 97:
intersphinx_mappingstill maps"torch"aftertorch >= 2.6.0was dropped fromrequirements.txt; no torch cross-reference remains, so it is a per-build network fetch for nothing.
Clearing those would move the doc build closer to being able to run under -W.
Training doc removal — thorough and correct; dropping torch >= 2.6.0 is a meaningful CI win. The existing thread on docs/python/index.rst about the published ortmodule/* and on_device_training/* URLs starting to 404 is still open at this head; not restating it as a new comment, but a line in the PR description confirming the deprecation (or redirect stubs) would close it out.
Also, the PR description is currently empty — please fill in the Description / Motivation sections.
Description
Motivation and Context