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

Fixes #2568. Updates the code so on exception in generated quantities, all generated quantities are NaN #2571

Merged
merged 2 commits into from Jul 9, 2018

Conversation

syclik
Copy link
Member

@syclik syclik commented Jul 7, 2018

Submission Checklist

  • Run unit tests: ./runTests.py src/test/unit
  • Run cpplint: make cpplint
  • Declare copyright holder and open-source license: see below

Summary

Fixes the behavior in mcmc_writer so that when there's an exception thrown in the model's generated quantities block, it writes out the parameter values and NaN for any generated quantity.

Intended Effect

Changes the behavior so that the number of draws is the number of iterations.

How to Verify

There's an updated unit test that verifies that the right terms are NaN.

If you run the model in issue #2568, there are now the right number of posterior draws with the rejections forcing all of the generated quantities to output NaN.

Side Effects

This fixes weird behavior of differing chain lengths.

This may affect the interfaces if they aren't accepting NaN as a valid value.

Documentation

None.

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

Generable

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Copy link
Member

@seantalts seantalts left a comment

Choose a reason for hiding this comment

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

Looks good to me. Not sure if you want someone else to double check.

@bob-carpenter bob-carpenter merged commit c980549 into develop Jul 9, 2018
@seantalts seantalts added this to the 2.17.1++ milestone Jul 13, 2018
@syclik syclik deleted the bugfix/issue-2568-exceptions-gq branch October 11, 2018 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants