بنقرة واحدة
categorize-miscategorized
// Distribute miscategorized PRs back to correct worksheets. Trigger on "categorize miscategorized", "distribute miscategorized", "process miscategorized".
// Distribute miscategorized PRs back to correct worksheets. Trigger on "categorize miscategorized", "distribute miscategorized", "process miscategorized".
Draft a dev-discuss.pytorch.org forum post that calls for feature submissions for an upcoming PyTorch release, in the style of "Reminder — Calls for Features & Upcoming Branch Cut". Use when the user asks for a release announcement, feature-submission reminder, call-for-features post, or dev-discuss post for a release. Produces a Markdown draft that merges the official key-dates timeline with the AI-identified feature list, and asks owning teams to file "Release highlight for Proposed Feature" issues.
Produce a draft "Features" section for a PyTorch release blog post by comparing two release branches (e.g., release/2.11 vs release/2.12). Use when the user asks to generate a release blog, list new features for a release, compare release branches, or draft content for pytorch.org/blog. Organizes features similar to https://pytorch.org/blog/pytorch-2-11-release-blog/ with Highlights and per-component sections (Dynamo, Inductor, Distributed, Export, MPS, ROCm, XPU, CPU, etc.), each tagged with stability (Stable / Beta / Prototype / API-Unstable).
Process cherry-picks from a release tracker issue. Trigger on "process cherry-picks", "cherry-picks", "update cherry picks".
Generate PyTorch release notes for a functional area. Use when the user says "gen-release-notes", "release notes", or wants to write/complete release notes for a functional area like "aotdispatcher", "dynamo", "inductor", etc.
| name | categorize-miscategorized |
| description | Distribute miscategorized PRs back to correct worksheets. Trigger on "categorize miscategorized", "distribute miscategorized", "process miscategorized". |
Read miscategorized.md, determine where each PR belongs, and append it to the correct worksheet's category section.
/categorize-miscategorized <version>
Where <version> is the PyTorch release version (e.g., 2.11.0).
<version> argument was provided. If missing, ask the user.<version>/ directory exists.<version>/miscategorized.md exists and is non-empty. If empty or missing, tell the user there's nothing to process.Scan <version>/todo/ and <version>/done/ for result_<area>.md files.
result_ prefix and .md suffix to get valid area names (e.g., distributed (dtensor), fx, inductor (aoti)).todo/ or done/.Parse the file into structured entries. Each entry has: PR number (or bare commit hash), description text, section header context, and provenance annotations.
Extract the "target area hint" from section headers using these patterns:
| Header pattern | Target area |
|---|---|
## <area> (from <source>) | <area> (e.g., ## distributed (dtensor) (from distributed) -> distributed (dtensor)) |
## From <source> worksheet / ### <area> | <area> (the ### <area> sub-heading) |
## not user facing | Category hint only; area is TBD — needs label resolution |
Ambiguous headers like ## CPU / Linear algebra | Needs label resolution |
For entries that reference a bare commit hash instead of a PR number:
gh api repos/pytorch/pytorch/commits/<HASH>/pulls --jq '.[0].number'
If no PR is found, mark the entry as LOW confidence and leave it in miscategorized.
Reuse the gen-release-notes GraphQL batch pattern (up to 100 aliases per query):
gh api graphql -f query='
{
pr170057: repository(owner: "pytorch", name: "pytorch") {
pullRequest(number: 170057) {
number
state
title
labels(first: 10) { nodes { name } }
}
}
pr169979: repository(owner: "pytorch", name: "pytorch") {
pullRequest(number: 169979) {
number
state
title
labels(first: 10) { nodes { name } }
}
}
}'
Generate the full query programmatically for all PR numbers. Fetch: release notes: labels, module: labels, topic: labels, state, title. Split into multiple queries if more than 100 PRs.
Apply this priority chain to determine the target area:
release notes: <X> label -> HIGH confidence if <X> matches a worksheet area. This is the authoritative signal and overrides section header hints.## distributed (dtensor) (from distributed) go to distributed (dtensor)).module: <X> label -> MEDIUM confidence. Map module names to areas (e.g., module: dtensor -> distributed (dtensor), module: inductor -> inductor).[DTensor], [AOTI], [ROCm], [xpu], [caffe2], [MPS] etc. map to their respective areas.build_frontend or releng. For JIT entries, suggest fx. If truly ambiguous, LOW confidence.Use topic: labels and title keywords to pick the correct ### <category> heading:
| Signal | Category |
|---|---|
topic: bug fixes or title contains "Fix"/"fix" | ### bug fixes |
topic: improvements | ### improvements |
topic: new feature | ### new features |
topic: performance | ### performance |
topic: bc breaking or [BC Breaking] in title | ### bc breaking |
topic: docs or [doc] in title | ### docs |
topic: not user facing or [BE]/Refactor/Clean up/typing/remove unused in title | ### not user facing |
| Default for internal-looking PRs | ### not user facing |
| Default otherwise | ### improvements |
Group HIGH and MEDIUM confidence PRs by target area. For each area:
todo/ or done/).(from: or (suggestion: to end of line. Examples: (from: dynamo, labeled \release notes: distributed (c10d)`), (from: dynamo, XPU/inductor test). Then locate the target ### heading, and append the cleaned entry after existing entries under that heading (before the next###` heading).After all entries have been moved, ensure each one meets the formatting standards defined in .claude/skills/gen-release-notes/SKILL.md under "Category guidelines" (Step 3b). The key points:
bc breaking, deprecation, new features: For each entry that is just a bare one-liner (title + PR link with no expanded description below it), fetch the PR body and diff, then rewrite it with the full polished format. BC breaking entries MUST have summary, impact, workaround, and before/after code examples. Deprecation entries MUST have before/after code. New features MUST have a clean description.improvements, bug fixes, performance, docs, devs, not user facing, security): Condensed one-liners are fine, but you MUST clean up noisy title prefixes on every entry. This is a separate pass from the detailed write-ups above — do it for all moved entries regardless of category.Title prefix cleanup (all categories):
Strip bracketed prefixes that are internal tags, not meaningful to end users. Common patterns to remove:
[BE], [BE][Ez], [pytorch], [pytorch][PR], [codemod], [reland][jit], [caffe2], [DTensor], [AOTI], [ROCm], [xpu], [functorch], [inductor], [dynamo], [export][folly][caffe2], [aarch64][caffe2], [pytorch][caffe2], [caffe2][cudnn][18/N], [19/N]Keep prefixes that add useful context not obvious from the worksheet heading, e.g. [BC Breaking] in a bc breaking section is redundant and should be removed, but [xpu][feature] in the inductor (aoti) worksheet — keep [xpu] since it tells the reader the entry is XPU-specific.
After stripping prefixes, capitalize the first letter of the remaining text. If the entry becomes empty or nonsensical after stripping, leave it as-is.
Example cleanups:
[jit] Raise ValueError for invalid fusion strategy → Raise ValueError for invalid fusion strategy[BE] remove redudant items in unordered_set → Remove redundant items in unordered_set[pytorch][PR] [reland][ROCm] remove caffe2 from hipify → Remove caffe2 from hipify[DTensor][BE] remove is_backward from redistribute_local_tensor → Remove is_backward from redistribute_local_tensorgh pr view <NUMBER> --repo pytorch/pytorch --json title,body,labels
gh pr diff <NUMBER> --repo pytorch/pytorch # for bc breaking / deprecation
Process entries needing detailed write-ups in batches, editing the worksheet after each batch (same pattern as gen-release-notes Step 3b). Do not accumulate all rewrites in memory.
(suggestion: likely belongs in <area> as <category>, reason: <brief explanation>) where the reason explains the signal (e.g., "title mentions DTensor", "module: sparse label", "caffe2 build infrastructure change"). This helps the human reviewer quickly decide.<!-- All entries have been distributed to their respective worksheets. -->Tell the user:
done/ worksheets were modified (flag these for re-review)| File | Why |
|---|---|
.claude/skills/gen-release-notes/SKILL.md | Pattern for skill structure, GraphQL batch-fetch, entry format, categories |
merge.py lines 94-134 | module_name_mapping dict — canonical area short names |
<version>/miscategorized.md | Input format to parse |
Any result_<area>.md worksheet | Output format — preamble + ## <area> + ### <category> sections |