-
Notifications
You must be signed in to change notification settings - Fork 220
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
Remove global AD flag "ADBACKEND" and function suite #2134
Conversation
For the second item, Lines 68 to 96 in 878cbe1
|
Related documentation PR TuringLang/docs#430 |
@yebai @devmotion the majority of the tests are passing, while the failed ones are numerical Maybe it's time to give the PR a look? |
@sunxd3 can you undo the formatting changes? It makes it somewhat annoying to review + makes version history a less clear |
Pull Request Test Coverage Report for Build 7194200743
💛 - Coveralls |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2134 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 21 21
Lines 1421 1390 -31
======================================
+ Misses 1421 1390 -31 ☔ View full report in Codecov by Sentry. |
@torfjelde another look? I am not familiar with the test failure, would love to take a closer look if not obvious why. |
result = optimize(model, MAP(), optimizer) | ||
vals = result.values | ||
@testset "$(nameof(typeof(optimizer)))" for optimizer in [LBFGS(), NelderMead()] | ||
result = optimize(model, MAP(), optimizer) |
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.
Can we also add adtypes
interface to optimisation-based algorithms, e.g. MLE
, MAP
?
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.
If I am not mistaken, Optim.jl seems to only support ForwardDiff
(https://github.com/JuliaNLSolvers/NLSolversBase.jl/blob/78af38393b14992ea996899c6486d971b5bfa612/src/NLSolversBase.jl#L5). If that's the case, it may not make much sense to add ADtypes now
Thanks, @sunxd3 -- it looks good overall. I left a few minor comments above. |
Co-authored-by: Hong Ge <[email protected]>
The remaining failing test is reproducible on the |
Also @yebai @devmotion, the current v0.30.0 is not registered yet, I did bump the minor version to 0.31.0, but maybe we can treat the PR as a part of 0.30 release? |
Co-authored-by: Hong Ge <[email protected]>
Addressing #2132, ref #2047 (comment)
This is likely to be quite hairy, as the ADBACKEND goes back.
Steps towards completion:
Turing.ADBackend()
withAutoForwardDiff
as default foradtype
argument in samplerssetadbackend
function, the main issue here is that tests use it quite extensively, so some refactoring is neededADSAFE
,CHUNKSIZE
, andRDCache
and related functions