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
Bugfix to MixtureSameFamily's _pad_mixture_dimension #118947
Conversation
Bugfix to _pad_mixture_dimensions. Now counts number of dimensions instead of number of elements as intended.
Regression test for bugfix to _mad_mixture_dimensions in previous commit.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/118947
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0618d65 with merge base 844a76e (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
def test_mixture_same_family_shape(self): | ||
mix_distribution = Categorical(torch.ones([3,1,3])) | ||
component_distribution = torch.distributions.Normal(torch.zeros([3,3,3]), torch.ones([3,3,3])) | ||
gmm = MixtureSameFamilyFixed(mix, comp) |
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.
whoops looks like you forgot to rename these variables
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.
...My God. This is what I get for not testing the exact same text I commit...chuckleheads like me are why we need devops.
Co-authored-by: Jeffrey Wan <soulitzer@gmail.com>
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!
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
As caught by CI
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
So two checks have failed on the new test. Both are ones with Torch Dynamo. I don't really know anything about Dynamo, or why it's accessing non-existent Tensor attributes. A lot of tests for torch.distributions are marked with this "Don't test this with Dynamo" tag. Trying to figure out if it's appropriate to apply that to the new one. |
Adding the skip like the other tests do sounds good to me |
Not knowledgeable about dynamo really; making a call because test seems simple/reasonable and many other torch.distribution tests skip if Dynamo.
Tests are passed, do you think this is ready to go? |
Yup, thanks for the follow up |
@pytorchbot merge |
Merge startedYour 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 |
Fixes Issue #73792 This is a duplicate of pull request. #73864. It's a small bugfix that should have happened a long time ago, but it didn't because I didn't actually follow up with the pull request after originally submitting. That's my bad. Trying to remedy the error. This contains a fix to _pad_mixture_dimension, which intends to count the number of dimensions in its referent tensors, but accidentally counts the number of elements (and can thus end up creating tensors with potentially thousands of dimensions by mistake). Also contains a single test for the fixed behavior. Co-authored-by: Jeffrey Wan <soulitzer@gmail.com> Pull Request resolved: #118947 Approved by: https://github.com/soulitzer
Fixes Issue pytorch#73792 This is a duplicate of pull request. pytorch#73864. It's a small bugfix that should have happened a long time ago, but it didn't because I didn't actually follow up with the pull request after originally submitting. That's my bad. Trying to remedy the error. This contains a fix to _pad_mixture_dimension, which intends to count the number of dimensions in its referent tensors, but accidentally counts the number of elements (and can thus end up creating tensors with potentially thousands of dimensions by mistake). Also contains a single test for the fixed behavior. Co-authored-by: Jeffrey Wan <soulitzer@gmail.com> Pull Request resolved: pytorch#118947 Approved by: https://github.com/soulitzer
Fixes Issue #73792 This is a duplicate of pull request. #73864. It's a small bugfix that should have happened a long time ago, but it didn't because I didn't actually follow up with the pull request after originally submitting. That's my bad. Trying to remedy the error. This contains a fix to _pad_mixture_dimension, which intends to count the number of dimensions in its referent tensors, but accidentally counts the number of elements (and can thus end up creating tensors with potentially thousands of dimensions by mistake). Also contains a single test for the fixed behavior. Co-authored-by: Jeffrey Wan <soulitzer@gmail.com> Pull Request resolved: #118947 Approved by: https://github.com/soulitzer
Fixes Issue #73792
This is a duplicate of pull request. #73864. It's a small bugfix that should have happened a long time ago, but it didn't because I didn't actually follow up with the pull request after originally submitting. That's my bad. Trying to remedy the error.
This contains a fix to _pad_mixture_dimension, which intends to count the number of dimensions in its referent tensors, but accidentally counts the number of elements (and can thus end up creating tensors with potentially thousands of dimensions by mistake). Also contains a single test for the fixed behavior.
cc @albanD