Better error message for Mass matrix contains zeros#2977
Merged
twiecki merged 5 commits intopymc-devs:masterfrom May 17, 2018
junpenglao:Better_error_msg
Merged
Better error message for Mass matrix contains zeros#2977twiecki merged 5 commits intopymc-devs:masterfrom junpenglao:Better_error_msg
twiecki merged 5 commits intopymc-devs:masterfrom
junpenglao:Better_error_msg
Conversation
We see user having a hard time debugging their model when the error `Mass matrix contains zeros on the diagonal. Some derivatives might always be zero` arise. See eg https://discourse.pymc.io/t/unsupervised-clustering-mass-matrix-contains-zeros-on-the-diagonal/1222/. This PR prints out where the error is, so user can easier address the bug by eg changing the scale of those RVs
Member
|
This is huge! Can you paste an example output? |
added 2 commits
May 16, 2018 15:41
Member
Author
Member
Author
|
Maybe it is more compact to say: |
Contributor
|
That's looks fair enough to me. :)
…On Wed, May 16, 2018 at 3:03 PM, Junpeng Lao ***@***.***> wrote:
[image: screen shot 2018-05-16 at 4 02 19 pm]
<https://user-images.githubusercontent.com/12952641/40121791-aa43fb4c-5922-11e8-985c-8884d265b28f.png>
Any suggestion on the wording?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2977 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA8DiOwCeY_vxwiToPU95V1ejvxgfxyBks5tzDHJgaJpZM4UBUqU>
.
--
Peadar Coyle
Skype: springcoilarch
www.twitter.com/springcoil
peadarcoyle.wordpress.com
|
Contributor
|
Hmm that would be more compact. You'd also have less thinking to do. :)
…On Wed, May 16, 2018 at 3:05 PM, Junpeng Lao ***@***.***> wrote:
Maybe it is more compact to say:
'The derivative of RVcenter[0] is zero.' using [0] to indicate the index
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2977 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA8DiJjgKz0Tx1Cbw-D8HMc-VWW1_tzdks5tzDIbgaJpZM4UBUqU>
.
--
Peadar Coyle
Skype: springcoilarch
www.twitter.com/springcoil
peadarcoyle.wordpress.com
|
added 2 commits
May 16, 2018 16:29
the index is after .ravel()
junpenglao
pushed a commit
that referenced
this pull request
May 29, 2018
* Better error message for NaN occurred in optimization Similar to #2977, this PR prints out where NaN occurred with potential strategy of how to debug it. * Add release note
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We see user having a hard time debugging their model when the error
Mass matrix contains zeros on the diagonal. Some derivatives might always be zeroarise. See eg https://discourse.pymc.io/t/unsupervised-clustering-mass-matrix-contains-zeros-on-the-diagonal/1222/.This PR prints out where the error is, so user can easier address the bug by eg changing the scale of those RVs