-
-
Notifications
You must be signed in to change notification settings - Fork 47
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 ode_adjoint_tol_ctl
#900
Conversation
# Conflicts: # src/middle/Stan_math_signatures.ml
Fyi: I will work on the doc during the week. |
Do we have a volunteer to review this? Who did the reviews of the other variadic ODE bits for stanc3? |
Stan_math_signatures.variadic_ode_fun_return_type | ||
UnsizedType.pp arg0 UnsizedType.pp arg1 UnsizedType.pp arg2 | ||
UnsizedType.pp_fun_arg arg0 UnsizedType.pp_fun_arg arg1 | ||
UnsizedType.pp_fun_arg arg2 |
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.
This change is so the error also prints data
for all variadic ODE types.
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.
IMO the signatures are pretty much unreadable either way but I suppose the data markers help if that was what caused the error.
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.
Yeah, I agree that the prints of the two large signatures is not great... But that is a different issue I guess as its not limited to just the variadic ODEs.
I think @nhuurre reviewed them mostly. If Niko does not have the time today or tomorrow, we can maybe ask @SteveBronder? |
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.
Apologies I tried giving this a review but I just don't think I know enough about these pieces of the compiler to understand the intuition behind a lot of the stuff going on here
@SteveBronder do you think you can get this review sorted or should we ping a few more devs? This is the last thing to make adjoint ODE land in Stan. |
@bbbales2 I started doc here: stan-dev/docs#358 not yet ready to merge, but it's a start. @SteveBronder @nhuurre @rybern Anyone can complete this review before the freeze tomorrow on the 18th? This is the last thing to make the adjoint solver come to Stan. |
@rok-cesnovar Do you think we can wait a little with the RC so that we get at least some feedback from stanc3 capable reviewers of this as to that they cannot make a review in time (or even wait until this is reviewed)? I would post on the forum and give people a heads up on this. Thoughts? |
I am definitely fine with waiting a day or two given the lack of reviews(or reviewers) in the last few weeks across all the repos. I dont know how others feel about it though. I also have a few pull requests ready for about 10 days in cmdstan. |
Ok, let's hope we find a reviewer for this in time. What cmdstan PR you want me to look at? |
So I made a call on the forum... let's hope we find a solution soon. I'd actually suggest to possibly wait until the Thursday Stan meeting and make the decision there if to tag right after the meeting or if people are willing to review things within a few days. Looking at what is outstanding, I'd think it would be good to make that extra cycle of about 1 week (max). |
|
It usually takes awhile to spin them up as we rarely need them. The tests have all passed which is the most important thing. |
Great. Tests all pass. Review time. |
[ (UnsizedType.AutoDiffable, UnsizedType.UReal) | ||
; (AutoDiffable, UReal); (DataOnly, UInt) ] | ||
[ (UnsizedType.DataOnly, UnsizedType.UReal) | ||
; (DataOnly, UReal); (DataOnly, UInt) ] |
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.
These are for nonadjoint ODEs. Why did they change?
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.
This is a bug currently. I should have mention it in the PR comment, sorry.
The tolerances in the nonadjoint should not allow autodiffable arguments as that causes C++ not to compile. This was reported by @bbbales2 in the Math PR but that PR has 500+ comments and I cant find the exact comment right now.
This would now error in stanc3 which is better I guess.
GitHub doesn't let me make this a review comment because it's not something you added in this pull but stanc3/src/middle/Semantic_error.ml Lines 210 to 213 in cee75fa
This if is backwards. You're supposed to call generate_ode_sig when args nonempty, not when it's empty.
|
Nice find. Fixed. |
Weird errors from test pipeline:
|
Restart helped, green lights. |
Hooray!!!! Thanks so much @nhuurre .... in particular for the short notice. Next time we give you an earlier heads-up for sure. |
Release notes
Added
ode_adjoint_tol_ctl
and improved type printing with variadic ODEs.Copyright and Licensing
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)