Skip to content

[BE] Apply up007 and up045 to torch/fx#176308

Closed
Lucaskabela wants to merge 1 commit intomainfrom
lucaskabela/up007_up045_fx
Closed

[BE] Apply up007 and up045 to torch/fx#176308
Lucaskabela wants to merge 1 commit intomainfrom
lucaskabela/up007_up045_fx

Conversation

@Lucaskabela
Copy link
Contributor

Convert Union[X, Y] to X | Y and Optional[X] to X | None using ruff rules UP007 and UP045 in torch/fx

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 3, 2026

🔗 Helpful Links

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

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

❌ 1 New Failure, 3 Unrelated Failures

As of commit 22d8f39 with merge base 2d653de (image):

NEW FAILURE - The following job has failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

@pytorch-bot pytorch-bot bot added ciflow/inductor release notes: fx release notes category labels Mar 3, 2026
@Lucaskabela Lucaskabela force-pushed the lucaskabela/up007_up045_fx branch from b1e501c to 88d238f Compare March 3, 2026 18:23
@Lucaskabela
Copy link
Contributor Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased lucaskabela/up007_up045_fx onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout lucaskabela/up007_up045_fx && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the lucaskabela/up007_up045_fx branch from 88d238f to 22d8f39 Compare March 3, 2026 21:40
@Lucaskabela Lucaskabela added topic: not user facing topic category and removed release notes: fx release notes category labels Mar 3, 2026
@Lucaskabela
Copy link
Contributor Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 3, 2026
@pytorchmergebot
Copy link
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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: inductor / inductor-test / test (inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu)

Details for Dev Infra team Raised by workflow job

@Lucaskabela
Copy link
Contributor Author

@pytorchmergebot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable), inductor / inductor-test / test (inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu)

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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (default, 3, 6, linux.rocm.gpu.gfx950.1)

Details for Dev Infra team Raised by workflow job

@Lucaskabela
Copy link
Contributor Author

@pytorchmergebot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 3 checks: inductor / inductor-cpu-test / test (cpu_inductor_torchbench, 1, 2, linux.2xlarge.amx, unstable), inductor / inductor-test / test (inductor_torchbench, 2, 2, linux.g5.4xlarge.nvidia.gpu), trunk / linux-jammy-rocm-py3.10 / test (default, 3, 6, linux.rocm.gpu.gfx950.1)

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

pytorchmergebot pushed a commit that referenced this pull request Mar 11, 2026
## Summary

Reverts #170946

This reverts commit fa27d4f.

The two stacked PRs (#170962 and #170973) have already been reverted on main:
- `0a06050b` Revert "[fx] Move _FindNodesLookupTable and _node_list to C++ (#170973)"
- `2ee3377b` Revert "[fx] Move _Namespace to C++ (#170962)"
- `fb60dd58` Revert "[fx] Fix quadratic name generation in _NamespaceBase.create_name (#176515)"

The only merge conflict was in `torch/fx/node.py` due to a type annotation modernization PR (#176308, `Optional[X]` → `X | None`). The conflict was resolved by keeping the modern annotation style while restoring the original Python implementation.

## Test plan
CI

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants