Skip to content

Fix Windows target determination for POSIX changed-file paths#188961

Closed
VectorPeak wants to merge 2 commits into
pytorch:mainfrom
VectorPeak:codex/step2-bughunt-20260705
Closed

Fix Windows target determination for POSIX changed-file paths#188961
VectorPeak wants to merge 2 commits into
pytorch:mainfrom
VectorPeak:codex/step2-bughunt-20260705

Conversation

@VectorPeak

@VectorPeak VectorPeak commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

tools/testing/modulefinder_determinator.py interprets changed-file paths when deciding whether slow tests need to run. Git and GitHub report changed files as repository-relative POSIX-style paths such as torch/utils/cpp_extension.py, even when the target determination code runs on Windows.

Before this change, modulefinder target determination split those paths with os.sep. On Windows, os.sep is \, so a Git-style path containing / stayed as one component and could be classified as UNKNOWN instead of TORCH, TEST, CAFFE2, or CI. UNKNOWN files conservatively trigger tests more broadly, so Windows runs could lose a useful target-determination signal and run more tests than necessary.

Fixes #188960

Authored with assistance from an AI assistant; reviewed by the contributor.
@pytorch-bot

pytorch-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 7f852d9 with merge base 5abd860 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Jul 5, 2026
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 6, 2026
@malfet

malfet commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@VectorPeak if you plan to submit more such changes, please keep your PR descriptions succinct

@malfet

malfet commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@VectorPeak

VectorPeak commented Jul 6, 2026 via email

Copy link
Copy Markdown
Contributor Author

vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
…h#188961)

`tools/testing/modulefinder_determinator.py` interprets changed-file paths when deciding whether slow tests need to run. Git and GitHub report changed files as repository-relative POSIX-style paths such as `torch/utils/cpp_extension.py`, even when the target determination code runs on Windows.

Before this change, modulefinder target determination split those paths with `os.sep`. On Windows, `os.sep` is `\`, so a Git-style path containing `/` stayed as one component and could be classified as `UNKNOWN` instead of `TORCH`, `TEST`, `CAFFE2`, or `CI`. `UNKNOWN` files conservatively trigger tests more broadly, so Windows runs could lose a useful target-determination signal and run more tests than necessary.

Fixes pytorch#188960
Pull Request resolved: pytorch#188961
Approved by: https://github.com/malfet
DamJanusz pushed a commit to DamJanusz/pytorch that referenced this pull request Jul 21, 2026
…h#188961)

`tools/testing/modulefinder_determinator.py` interprets changed-file paths when deciding whether slow tests need to run. Git and GitHub report changed files as repository-relative POSIX-style paths such as `torch/utils/cpp_extension.py`, even when the target determination code runs on Windows.

Before this change, modulefinder target determination split those paths with `os.sep`. On Windows, `os.sep` is `\`, so a Git-style path containing `/` stayed as one component and could be classified as `UNKNOWN` instead of `TORCH`, `TEST`, `CAFFE2`, or `CI`. `UNKNOWN` files conservatively trigger tests more broadly, so Windows runs could lose a useful target-determination signal and run more tests than necessary.

Fixes pytorch#188960
Pull Request resolved: pytorch#188961
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows target determination misclassifies POSIX changed-file paths

4 participants