auto-label
Skill121 starsChanged 5 months agoApache-2.0View on GitHub
Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- asm-source-mappingSkill
- at-dispatch-v2Skill
- extract-asm-onednnSkill
- extract-asm-syclkernel-aotSkill
- extract-asm-syclkernel-jitSkill
- extract-asm-tritonSkill
- extract-xpu-kernel-asmSkill
- fix-implementSkill
- fix-reproduceSkill
- fix-root-causeSkill
- fix-verifySkill
- issue-handlerSkill
- issue-triageSkill
- label-issueSkill
- oob-perf-analysisSkill
- pr-reviewSkill
- release-branchingSkill
- skill-writerSkill
- ut-checkSkill
- ut-issue-authoringSkill
- ut-refactor-reviewSkill
- xpu-alignmentSkill
- xpu-build-pytorchSkill
- xpu-ci-health-checkSkill
- xpu-ops-pr-creationSkill
- xpu-release-notesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 3 are distinctive, and 25 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
25
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Condition: ALL changed files match .github/ISSUE_TEMPLATE/, .github/copilot-instructions.md, .claude/, test/agentic/, or other …
- Very specific: line 47
If modifying _linux_build.yml or build-related actions/scripts → keep linux-build running, disable others: …
- Very specific: line 48
If modifying _linux_ut.yml or UT-related actions/scripts → keep linux-ut running: disable_e2e,disable_distributed,disable_win
- Very specific: line 49
If modifying _linux_e2e.yml or e2e-related actions/scripts → keep linux-e2e running: disable_ut,disable_distributed,disable_win
- Very specific: line 50
If modifying _windows_*.yml or .github/actions/windows-* → keep windows jobs running, add windows_ci: …
- Very specific: line 51
If modifying pull.yml only (trigger/condition/concurrency changes) → disable_all
- Very specific: line 52
If modifying only non-functional workflows (auto_label.yml, auto_merge_by_comment.yml, issue_operator.yml, bot.yml) or bot scripts …
- Very specific: line 53
If modifying MULTIPLE workflow areas or unclear scope → run full CI: none
- Very specific: line 55
Additional: If no src/, cmake/, CMakeLists.txt files changed, add disable_build.
- Very specific: line 59
Condition: ALL changed files are test/xpu/skip_list_common.py, test/xpu/expect/, test/xpu/extended/skip_list_*.py, or …
- Very specific: line 71
Rationale: Test infrastructure affects all UT suites across platforms, so UT must run and disable_win must NOT be added.
- Very specific: line 73
Additional: Always add disable_build (test-only changes don't need source build).
- Very specific: line 77
Condition: ALL changed files are under test/ (excluding files handled by Rules 3-4).
- Very specific: line 82
If files are ONLY under test/xpu/functorch/ or test/xpu/dynamo/ or test/xpu/higher_order_ops/: add disable_win
- Very specific: line 83
If NO files under paths covered by Windows UT (test/xpu/test_ops*.py, test/xpu/core/, test/xpu/test_nn*.py): add disable_win
- Very specific: line 95
Do NOT add disable_win — kernel fixes may be platform-specific (e.g.
- Very specific: line 99
Add disable_win (xccl is Linux-only)
- Very specific: line 101
Note: Do NOT add disable_build — source changes require compilation.
- Very specific: line 117
If any src/ file changed: do NOT add disable_build
- Very specific: line 118
If any cmake//CMakeLists.txt changed: do NOT add disable_build
- Distinctive: line 119
Only disable a job if ALL changed files agree it should be disabled
- Very specific: line 124
No files changed in src/ (excluding src//*.py)
- Very specific: line 125
No files changed in cmake/
- Very specific: line 127
No files changed in tools/ that affect the build
- Very specific: line 129
When disable_build is applied, CI uses nightly wheel instead of building from source.
- Distinctive: line 133
When used by the auto-label workflow, output ONLY the label names as a comma-separated list:
- Distinctive: line 139
If no labels should be applied (full CI needed), output:
- Very specific: line 148
PRs with
ai_generatedlabel: should still follow these rules (they need CI validation).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Auto-Labeling Rules
Purpose
Determine which disable_* CI labels to apply to a PR based on the files changed.
These labels control which CI jobs run, reducing unnecessary CI load.
Available Labels
| Label | Effect |
disable_all | Skip all CI test jobs, only run lint |
disable_ut | Skip non-distributed UT jobs |
disable_e2e | Skip e2e (inductor benchmark) jobs |
disable_distributed | Skip distributed UT jobs |
disable_win | Skip Windows CI jobs |
disable_build | Skip source build, use nightly wheel |
Note: Only labels consumed by pull.yml are in scope. Other labels (disable_accelerate, disable_transformers) are used by separate workflows and not managed here.
Decision Rules
Evaluate the file paths changed in the PR and apply labels using the following logic. Rules are evaluated top-to-bottom; use the FIRST matching rule set.
Rule 1: Pure CI metadata (no functional logic change)
Condition: ALL changed files match .github/ISSUE_TEMPLATE/, .github/copilot-instructions.md, .claude/, test/agentic/, or other non-functional metadata files. No .github/workflows/, .github/actions/, or .github/scripts/ changes.
Labels: disable_all
Examples: Updating issue templates, adding skills docs, agentic test fixtures.
Rule 2: CI workflow / action / script changes
Condition: Changed files include .github/workflows/, .github/actions/, or .github/scripts/.
Labels: Determined by WHICH workflows/actions/scripts are modified:
- If modifying
_linux_build.ymlor build-related actions/scripts → keep linux-build running, disable others:disable_ut,disable_e2e,disable_distributed,disable_win - If modifying
_linux_ut.ymlor UT-related actions/scripts → keep linux-ut running:disable_e2e,disable_distributed,disable_win - If modifying
_linux_e2e.ymlor e2e-related actions/scripts → keep linux-e2e running:disable_ut,disable_distributed,disable_win - If modifying
_windows_*.ymlor.github/actions/windows-*→ keep windows jobs running, addwindows_ci:disable_ut,disable_e2e,disable_distributed - If modifying
pull.ymlonly (trigger/condition/concurrency changes) →disable_all - If modifying only non-functional workflows (
auto_label.yml,auto_merge_by_comment.yml,issue_operator.yml,bot.yml) or bot scripts (.github/scripts/bot_*.py) →disable_all - If modifying MULTIPLE workflow areas or unclear scope → run full CI:
none
Additional: If no src/, cmake/, CMakeLists.txt files changed, add disable_build.
Rule 3: Only skip/expect list changes
Condition: ALL changed files are test/xpu/skip_list_common.py, test/xpu/expect/, test/xpu/extended/skip_list_*.py, or test/xpu/test_decomp_xpu.py (pure skip list / expect file updates with no test logic change).
Labels: disable_all
Rationale: Skip list changes don't need functional validation beyond lint.
Rule 4: Test infrastructure changes
Condition: Changed files include test/xpu/xpu_test_utils.py or test/xpu/run_test_with_skip.py (test infrastructure used by all test suites).
Labels: disable_e2e, disable_distributed
Rationale: Test infrastructure affects all UT suites across platforms, so UT must run and disable_win must NOT be added. E2E and distributed use separate infrastructure.
Additional: Always add disable_build (test-only changes don't need source build).
Rule 5: Test-only changes
Condition: ALL changed files are under test/ (excluding files handled by Rules 3-4).
Labels (base): disable_e2e, disable_distributed
Additional modifiers:
- If files are ONLY under
test/xpu/functorch/ortest/xpu/dynamo/ortest/xpu/higher_order_ops/: adddisable_win - If NO files under paths covered by Windows UT (
test/xpu/test_ops*.py,test/xpu/core/,test/xpu/test_nn*.py): adddisable_win
Additional: Always add disable_build (test-only changes don't need source build).
Rule 6: Kernel/operator source changes (src/)
Condition: Changed files include src/ATen/ or src/xccl/ (but NOT src/*.cmake, src/CMakeLists.txt, or src/Build*.cmake — those are build system files, see Rule 7).
Labels: Depends on which subdirectory:
src/ATen/only (kernel/operator code, no xccl):- Base:
disable_e2e,disable_distributed - Do NOT add
disable_win— kernel fixes may be platform-specific (e.g. a fix specifically for Windows)
- Base:
src/xccl/involved (distributed communication backend):- Base:
disable_e2eonly — do NOT adddisable_distributed(xccl changes must run distributed tests) - Add
disable_win(xccl is Linux-only)
- Base:
Note: Do NOT add disable_build — source changes require compilation.
Rule 7: Build system changes
Condition: Changed files include cmake/, CMakeLists.txt, src/**/*.cmake, src/Build*.cmake, or tools/.
Labels: None (or minimal). Build system changes need full CI validation.
If ONLY build system files changed (no test, no kernel): disable_e2e, disable_distributed
Rule 8: Mixed changes (fallback)
Condition: None of the above rules fully apply (mixed src + test + CI, etc.).
Labels: Apply the INTERSECTION of what each individual file category would disable.
- If any
src/file changed: do NOT adddisable_build - If any
cmake//CMakeLists.txtchanged: do NOT adddisable_build - Only disable a job if ALL changed files agree it should be disabled
disable_build Logic (cross-cutting)
disable_build can be added whenever ALL of these are true:
- No files changed in
src/(excludingsrc/**/*.py) - No files changed in
cmake/ - No
CMakeLists.txtchanged - No files changed in
tools/that affect the build
When disable_build is applied, CI uses nightly wheel instead of building from source.
Output Format
When used by the auto-label workflow, output ONLY the label names as a comma-separated list:
disable_e2e,disable_distributed,disable_winIf no labels should be applied (full CI needed), output:
noneImportant Notes
disable_autolabel — When manually added to a PR, auto-labeling is completely disabled for that PR. The workflow will skip without allocating a runner. This label should only be added manually by humans (never by automation) to opt out of auto-labeling when full manual control over CI labels is needed.- PRs with
ai_generatedlabel should still follow these rules (they need CI validation). - When in doubt, disable less. It's better to run unnecessary CI than to miss a regression.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

