Skip to content

Conversation

ringohoffman
Copy link

@ringohoffman ringohoffman commented Jun 13, 2023

Fixes #103485

Type checkers don't know about the existence of retains_grad otherwise:

torch.randn(10, 10).retains_grad  # Cannot access member "retains_grad" for type "Tensor"

cc: @albanD @ezyang @janeyx99

cc @albanD

@pytorch-bot
Copy link

pytorch-bot bot commented Jun 13, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Thanks!

@albanD albanD added topic: improvements topic category module: python frontend For issues relating to PyTorch's Python frontend labels Jun 13, 2023
@albanD
Copy link
Collaborator

albanD commented Jun 13, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 13, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@albanD albanD added the release notes: python_frontend python frontend release notes category label Jun 13, 2023
@albanD
Copy link
Collaborator

albanD commented Jun 13, 2023

@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

@ezyang
Copy link
Contributor

ezyang commented Jun 13, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot.

@ezyang
Copy link
Contributor

ezyang commented Jun 13, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled. If you believe this is a mistake,then you can re trigger it through pytorch-bot.

@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

Copy link
Contributor

@janeyx99 janeyx99 left a comment

Choose a reason for hiding this comment

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

ah nice nice

@ringohoffman ringohoffman deleted the add-retains-grad-type-hint branch August 11, 2023 13:59
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 module: python frontend For issues relating to PyTorch's Python frontend open source release notes: python_frontend python frontend release notes category topic: improvements topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose Tensor.retains_grad property in Python API
7 participants