Skip to content
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

[Functorch] Skip docs setup if called in optimize mode #100750

Closed
wants to merge 1 commit into from

Conversation

malfet
Copy link
Contributor

@malfet malfet commented May 5, 2023

Test plan: python3 -OO -c "import torch._functorch.deprecated"

Fixes #100680

cc @zou3519 @Chillee @samdow @soumith @kshitij12345 @janeyx99

@pytorch-bot
Copy link

pytorch-bot bot commented May 5, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

@malfet malfet requested review from zou3519 and albanD May 5, 2023 20:36
@albanD
Copy link
Collaborator

albanD commented May 5, 2023

Note that we fixed these before by adding None checks before instead of checking the optimize flag: #76619
Also this file is not imported when PyTorch is imported? There should have a been a test to detect that!

@malfet malfet added topic: bug fixes topic category module: functorch Pertaining to torch.func or pytorch/functorch labels May 5, 2023
@malfet malfet force-pushed the malfet/do-not-setup-doc-if-optimized branch from 6a9ba3f to 3cd067a Compare May 5, 2023 23:38
@malfet
Copy link
Contributor Author

malfet commented May 5, 2023

@albanD thanks for the feedback. Added it to the test and use is None check, which is more Pythonic than sys.flags.optimize < 2

@malfet malfet changed the title [Functorch] Don't try to setup docs if called with optimize [Functorch] Skip docs setup if called in optimize mode May 5, 2023
Test plan: `python3 -OO -c "import torch._functorch.deprecated"`
@malfet malfet force-pushed the malfet/do-not-setup-doc-if-optimized branch from 3cd067a to 05fd424 Compare May 5, 2023 23:43
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 for the update!

@malfet
Copy link
Contributor Author

malfet commented May 8, 2023

@pytorchbot merge

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

Merge failed

Reason: This PR needs a 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

@malfet malfet added the release notes: python_frontend release notes category label May 8, 2023
@malfet
Copy link
Contributor Author

malfet commented May 8, 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

@malfet malfet deleted the malfet/do-not-setup-doc-if-optimized branch May 8, 2023 23:41
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: functorch Pertaining to torch.func or pytorch/functorch release notes: python_frontend release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_functorch/deprecated.py makes use of __doc__
3 participants