-
Notifications
You must be signed in to change notification settings - Fork 22.2k
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
[torch.distributions] Implement positive-semidefinite constraint #71375
[torch.distributions] Implement positive-semidefinite constraint #71375
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 7e20f50 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages: win-vs2019-cpu-py3 / test (default, 1, 2, windows.4xlarge) (1/1)Step: "Test" (full log | diagnosis details | 🔁 rerun)
|
@pytorchbot ciflow rerun |
@neerajprad May I ask your opinions on this PR? |
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 for adding this constraint! I just had a small comment on the naming.
@pytorchbot ciflow rerun |
This reverts commit 58df1f0.
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.
LGTM, thanks for adding this new constraint.
@neerajprad has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
) Summary: While implementing #70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: #71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518
) Summary: While implementing #70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: #71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518 (cherry picked from commit 43eaea5)
Thank you for the reviews and feedbacks. |
…375) Summary: While implementing pytorch/pytorch#70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: pytorch/pytorch#71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518 (cherry picked from commit 43eaea5)
…375) Summary: While implementing pytorch/pytorch#70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: pytorch/pytorch#71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518 (cherry picked from commit 43eaea5)
…375) Summary: While implementing pytorch/pytorch#70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: pytorch/pytorch#71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518 (cherry picked from commit 43eaea5)
…375) Summary: While implementing pytorch/pytorch#70275, I thought that it will be useful if there is a `torch.distributions.constraints` to check the positive-semidefiniteness of matrix random variables. This PR implements it with `torch.linalg.eigvalsh`, different from `torch.distributions.constraints.positive_definite` implemented with `torch.linalg.cholesky_ex`. Currently, `torch.linalg.cholesky_ex` returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism. cc neerajprad Pull Request resolved: pytorch/pytorch#71375 Reviewed By: H-Huang Differential Revision: D33663990 Pulled By: neerajprad fbshipit-source-id: 02cefbb595a1da5e54a239d4f17b33c619416518 (cherry picked from commit 43eaea5)
While implementing #70275, I thought that it will be useful if there is a
torch.distributions.constraints
to check the positive-semidefiniteness of matrix random variables.This PR implements it with
torch.linalg.eigvalsh
, different fromtorch.distributions.constraints.positive_definite
implemented withtorch.linalg.cholesky_ex
.Currently,
torch.linalg.cholesky_ex
returns only the order of the leading minor that is not positive-definite in symmetric matrices and we can't check positive semi-definiteness by the mechanism.cc @neerajprad