-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add diagnose
method to CmdStanModel
.
#734
base: develop
Are you sure you want to change the base?
Conversation
09ce0bb
to
e974a13
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #734 +/- ##
===========================================
- Coverage 80.23% 79.76% -0.48%
===========================================
Files 25 25
Lines 3845 3879 +34
===========================================
+ Hits 3085 3094 +9
- Misses 760 785 +25 ☔ View full report in Codecov by Sentry. |
How would you feel about modeling this more after the |
e974a13
to
e6ac0c1
Compare
Good point, updated. Only caveat is that if |
Thanks for the comments, I'll have a look. As an aside, do we mind how close the interfaces of |
I believe they have support for log_prob through some optional RCPP stuff, which is pretty far outside anything we’d want to do in Python. We try to be consistent-ish for big things like the names and default values of the arguments to |
2b8b469
to
a8a3e63
Compare
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!
I'm going to hold off on merging this to see if anything comes in which would justify a 1.2.2 patch, but this will be in the next major version.
8f3d3b4
to
2b19fc8
Compare
Submission Checklist
Summary
This PR adds the
diagnose
method toCmdStanModel
which can be used to verify gradients, e.g., explicit gradients for custom functions implemented in C++. Documentation is based on the equivalentcmdstanr
function and other methods, such asCmdStanModel.variational
.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): Harvard University
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: