-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[pytree] Only import optree if it's used #131478
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
Conversation
torch.utils._pytree imports optree if it's available. Instead, we change it to if it gets used. The motivation for this is better isolation. Test Plan: - new tests [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/131478
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit bdef50d with merge base 406f510 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for taking the time to fix this!
FYI @XuehaiPan
script = """ | ||
import sys | ||
import torch | ||
import torch.utils._pytree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is imported by side effect by "import torch" so this is not needed today
@pytorchbot merge -f "rocm infinite queue" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
torch.utils._pytree imports optree if it's available. Instead, we change it to if it gets used. The motivation for this is better isolation. Test Plan: - new tests Pull Request resolved: pytorch#131478 Approved by: https://github.com/albanD
Stack from ghstack (oldest at bottom):
torch.utils._pytree imports optree if it's available. Instead, we change
it to if it gets used. The motivation for this is better isolation.
Test Plan: