8000 [dynamo] replace `unimplemented` with `unimplemented_v2` in `variables/torch_functions.py` by StrongerXi · Pull Request #151278 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[dynamo] replace unimplemented with unimplemented_v2 in variables/torch_functions.py #151278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

…s/torch_functions.py`

This addresses part of #147913.

[ghstack-poisoned]
Copy link
pytorch-bot bot commented Apr 15, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 9d61b43 with merge base 3849fd1 (image):
💚 Looks good so far! There are no failures yet. 💚

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

StrongerXi added a commit that referenced this pull request Apr 15, 2025
…s/torch_functions.py`

This addresses part of #147913.

ghstack-source-id: f626e10
Pull Request resolved: #151278
@StrongerXi StrongerXi requested a review from williamwen42 April 15, 2025 17:29
unimplemented_v2(
gb_type="TypeError from user code",
context=f"{fn=}, {args=}, {kwargs=}",
explanation="No available `__torch_function__` override found",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention that specifically, "all torch_function overrides returned NotImplemented"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

unimplemented(
f"Accessing {name} on a tensor subclass with a __torch_function__ override is not supported"
unimplemented_v2(
gb_type="Tensor subclass attribute access",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gb_type="Tensor subclass attribute access",
gb_type="Unsupported Tensor subclass attribute access",

f"Calling overridden method {name} on a tensor"
" subclass with a __torch_function__ override is not supported"
unimplemented_v2(
gb_type="Tensor subclass method call",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gb_type="Tensor subclass method call",
gb_type="Tensor subclass overriden method call",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

unimplemented(
f"Currently only support accessing overridden attributes that are functions or properties, but got {type(attr)}" # noqa: B950
unimplemented_v2(
gb_type="Tensor subclass attribute access",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gb_type="Tensor subclass attribute access",
gb_type="Tensor subclass non-function/proprety overriden attribute access",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "Unsupported" in front, since the supported set here might change frequently.

Copy link
Contributor Author
@StrongerXi StrongerXi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Address comments.

unimplemented_v2(
gb_type="TypeError from user code",
context=f"{fn=}, {args=}, {kwargs=}",
explanation="No available `__torch_function__` override found",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

unimplemented(
f"Currently only support accessing overridden attributes that are functions or properties, but got {type(attr)}" # noqa: B950
unimplemented_v2(
gb_type="Tensor subclass attribute access",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "Unsupported" in front, since the supported set here might change frequently.

f"Calling overridden method {name} on a tensor"
" subclass with a __torch_function__ override is not supported"
unimplemented_v2(
gb_type="Tensor subclass method call",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

…n `variables/torch_functions.py`"

This addresses part of #147913.

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

[ghstack-poisoned]
StrongerXi added a commit that referenced this pull request Apr 30, 2025
…s/torch_functions.py`

This addresses part of #147913.

ghstack-source-id: ed9484e
Pull Request resolved: #151278
@StrongerXi StrongerXi added the topic: not user facing topic category label May 1, 2025
…n `variables/torch_functions.py`"

This addresses part of #147913.

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

[ghstack-poisoned]
StrongerXi added a commit that referenced this pull request May 1, 2025
…s/torch_functions.py`

This addresses part of #147913.

ghstack-source-id: 26b24fa
Pull Request resolved: #151278
unimplemented_v2(
gb_type="TypeError from user code",
context=f"{fn=}, {args=}, {kwargs=}",
explanation="All __torch_function__ overrides for returned NotImplemented",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
explanation="All __torch_function__ overrides for returned NotImplemented",
explanation=f"All __torch_function__ overrides for function {fn} returned NotImplemented",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

…n `variables/torch_functions.py`"

This addresses part of #147913.

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

[ghstack-poisoned]
StrongerXi added a commit that referenced this pull request May 2, 2025
…s/torch_functions.py`

This addresses part of #147913.

ghstack-source-id: 181dda5
Pull Request resolved: #151278
@StrongerXi
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 2, 2025
@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

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@StrongerXi
Copy link
Contributor Author

@pytorchbot merge

@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

10637

@StrongerXi
Copy link
Contributor Author

@pytorchbot merge -f "unrelated jobs stuck"

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0