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

Bugfix to MixtureSameFamily's _pad_mixture_dimension #118947

Closed
wants to merge 7 commits into from

Conversation

CJMenart
Copy link
Contributor

@CJMenart CJMenart commented Feb 2, 2024

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

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.
Copy link

pytorch-bot bot commented Feb 2, 2024

🔗 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 Failures

As of commit 0618d65 with merge base 844a76e (image):
💚 Looks good so far! There are no failures yet. 💚

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

Copy link

linux-foundation-easycla bot commented Feb 2, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

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)
Copy link
Contributor

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

Copy link
Contributor Author

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.

@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 2, 2024
Copy link
Contributor

@soulitzer soulitzer left a comment

Choose a reason for hiding this comment

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

Thanks!

@soulitzer
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 2, 2024
@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

As caught by CI
@soulitzer soulitzer added the module: python frontend For issues relating to PyTorch's Python frontend label Feb 2, 2024
@soulitzer
Copy link
Contributor

@pytorchbot merge

@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

@CJMenart
Copy link
Contributor Author

CJMenart commented Feb 3, 2024

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.

@soulitzer
Copy link
Contributor

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

@soulitzer soulitzer added the release notes: python_frontend release notes category label Feb 3, 2024
Not knowledgeable about dynamo really; making a call because test seems simple/reasonable and many other torch.distribution tests skip if Dynamo.
@CJMenart
Copy link
Contributor Author

CJMenart commented Feb 6, 2024

Tests are passed, do you think this is ready to go?

@soulitzer
Copy link
Contributor

Yup, thanks for the follow up

@soulitzer
Copy link
Contributor

@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

pytorch-bot bot pushed a commit that referenced this pull request Feb 8, 2024
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
vfdev-5 pushed a commit to vfdev-5/pytorch that referenced this pull request Feb 9, 2024
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
clee2000 pushed a commit that referenced this pull request Feb 14, 2024
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
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 release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants