Skip to content

Catch deprecated API warnings from tutorial builds#3810

Draft
svekars wants to merge 4 commits intomainfrom
add-api-checker
Draft

Catch deprecated API warnings from tutorial builds#3810
svekars wants to merge 4 commits intomainfrom
add-api-checker

Conversation

@svekars
Copy link
Copy Markdown
Contributor

@svekars svekars commented Mar 31, 2026

When tutorials use deprecated PyTorch APIs, Python fires DeprecationWarning and FutureWarning at runtime — but these warnings are currently silently ignored during the Sphinx Gallery build. We do not notice them until a user tries to run a tutorial and hits a broken API.

This PR attempts two capture those during the CI build, parses them, and automatically creates/updates a GitHub Issue listing the deprecated API usage by tutorial file.

Changes

  • tools/deprecation_checker/ (new) — parses build log for DeprecationWarning/FutureWarning, generates Markdown report, optionally creates/updates a GitHub Issue
  • .jenkins/build.sh — add a function to capture make docs output to _build/build.log via tee, generates report per worker, merges logs and files issue in manager. Guarded with || true.
  • .github/workflows/_build-tutorials-base.yml — added an entry to upload report as build artifact

How it works

  • Runs during the CI build when Sphinx Gallery executes tutorials on GPU workers
  • Single GitHub Issue with docs-agent-deprecations label, updated each build (no duplicates)
  • Auto-closes when all warnings are resolved; reopens if new ones appear
  • Tags cc: @svekars

Test Plan

  • Needs CI run to verify end-to-end

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Mar 31, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3810

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

⏳ No Failures, 19 Pending

As of commit 92d49b3 with merge base f79c3d9 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla bot added the cla signed label Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant