Skip to content

Fix torch.utils._traceback on Python 3.11 - #101277

Closed
ezyang wants to merge 4 commits into
gh/ezyang/2096/basefrom
gh/ezyang/2096/head
Closed

ezyang wants to merge 4 commits into
gh/ezyang/2096/basefrom
gh/ezyang/2096/head

Conversation

@ezyang

@ezyang ezyang commented May 12, 2023 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Edward Z. Yang <[email protected]>

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented May 12, 2023 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit e0d4f29:
💚 Looks good so far! There are no failures yet. 💚

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

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sound good!

Comment thread torch/utils/_traceback.py Outdated
@@ -61,6 +89,22 @@ def report_compile_source_on_error():
# just have less accurate name info
if hasattr(code, 'replace'):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: we only support 3.8+ so this check could be removed.

@ezyang ezyang added ciflow/trunk Trigger trunk jobs on your pull request release notes: composability release notes category topic: bug fixes topic category labels May 12, 2023
Signed-off-by: Edward Z. Yang <ezyangmeta.com>

[ghstack-poisoned]
@ezyang

ezyang commented May 12, 2023

Copy link
Copy Markdown
Contributor Author

@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

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

Comment thread torch/utils/_traceback.py
code = code.replace(co_name=frame.f_code.co_name)
code = code.replace(co_name=frame.f_code.co_name)
# Python 3.11 only
if hasattr(frame.f_code, 'co_linetable'):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This probably needs to be a Python version check to make mypy happy?

Signed-off-by: Edward Z. Yang <ezyangmeta.com>

[ghstack-poisoned]
Signed-off-by: Edward Z. Yang <ezyangmeta.com>

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/slow ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: composability release notes category topic: bug fixes topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants