pytorch - ✅(Solved) Fix release notes commit script should respect user-specified labels [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
pytorch/pytorch#177135Fetched 2026-04-08 00:22:01
View on GitHub
Comments
0
Participants
1
Timeline
18
Reactions
0
Author
Participants
Timeline (top)
subscribed ×12labeled ×3mentioned ×2added_to_project_v2 ×1

PR fix notes

PR #173401: [BE][Functorch] Add type hints to torch/_functorch files for pyrefly coverage

Description (problem / solution / changelog)

Add comprehensive type annotations to 7 files in torch/_functorch that were previously missing type coverage. Each file now passes pyrefly check with stricter sub-config settings (implicit-any=true).

Files updated:

  • compile_utils.py
  • benchmark_utils.py
  • frontend_utils.py
  • vmap.py
  • fx_minifier.py
  • top_operators_github_usage.py
  • collect_metadata_analysis.py

Authored with help of Claude Code

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo

Changed files

  • pyrefly.toml (modified, +2/-1)
  • torch/_functorch/_aot_autograd/collect_metadata_analysis.py (modified, +25/-16)
  • torch/_functorch/_aot_autograd/frontend_utils.py (modified, +23/-13)
  • torch/_functorch/_aot_autograd/input_output_analysis.py (modified, +1/-0)
  • torch/_functorch/benchmark_utils.py (modified, +46/-36)
  • torch/_functorch/compile_utils.py (modified, +23/-12)
  • torch/_functorch/fx_minifier.py (modified, +102/-52)
  • torch/_functorch/top_operators_github_usage.py (modified, +12/-11)
  • torch/_functorch/vmap.py (modified, +121/-49)
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

When I ran python commitlist.py --create_new for generating the initial release note categorization for 2.11.0, the script categorized https://github.com/pytorch/pytorch/pull/173401 into "functorch", even though there was a "release notes:fx" label.

Claude debug writeup: https://gist.github.com/vkuzo/16773f0d110adfd4dd4f03d104d101bd, we should fix it. Filing so we remember to look at this later.

Versions

main branch after the 2.11.0 branch cut

cc @seemethere @malfet @pytorch/pytorch-dev-infra

extent analysis

Fix Plan

Fix Name: Update Label Categorization Logic

Step-by-Step Solution

  1. Update commitlist.py to use the labels API: Instead of relying on the release notes:fx label, use the GitHub API to fetch all labels on the pull request and categorize it based on the presence of specific labels.
  2. Use the github-labels library: Install the github-labels library using pip: pip install github-labels.
  3. Update the commitlist.py script: Replace the label-based categorization logic with the following code:
import github_labels

def categorize_pr(pr):
    labels = github_labels.get_labels(pr)
    if any(label.name == "release notes:fx" for label in labels):
        return "fx"
    # Add more label-based categorization rules as needed
    return "functorch"

# Usage:
pr = github_labels.get_pr("https://github.com/pytorch/pytorch/pull/173401")
categorization = categorize_pr(pr)
print(categorization)
  1. Test the updated script: Run python commitlist.py --create_new again to verify that the script categorizes the pull request correctly.

Verification

  • Run the script with the --create_new flag and verify that the pull request is categorized correctly.
  • Review the GitHub API logs to ensure that the script is making the correct API calls.

Extra Tips

  • Make sure to handle any exceptions that may occur when making API calls to the GitHub labels endpoint.
  • Consider adding more label-based categorization rules as needed to ensure accurate categorization of pull requests.

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 - ✅(Solved) Fix release notes commit script should respect user-specified labels [1 pull requests, 1 participants]