nimbleEcology icon indicating copy to clipboard operation
nimbleEcology copied to clipboard

warning in AD-enabled nimbleEcology

Open paciorek opened this issue 11 months ago • 3 comments

We'll need to address this warning that arises for dCJS:

[Note] Detected use of function(s) that are not supported for derivative tracking in a function or method for which `buildDerivs` has been requested: is.na.

paciorek avatar Mar 10 '24 19:03 paciorek

@perrydv @danielturek @dochvam Looks like this was overlooked in nimbleEcology 0.5.0.

This comes from dCJS, and I presume it means it won't work with AD.

paciorek avatar Jul 28 '24 20:07 paciorek

Ok, so dCJS works fine with AD (I tried HMC on the dCJS_vs example). is.na is run on a variable that is the output of ADbreak.

So this is really a nimble question in terms of the warning we emit about non-AD enabled function in DSL code. I'll make an issue in nimble-dev/nimble.

paciorek avatar Aug 08 '24 18:08 paciorek

Actually I will leave this open as one path forward here (if we leave the AD checking) is to set up a nimble option that turns off the checking and temporarily invoke that before the dCJS functions are given in dCJS.R so that when the file is sourced, the warning is not emitted.

paciorek avatar Aug 08 '24 18:08 paciorek

Turns out we already had an option in nimble to turn this off (doADerrorTraps), so I just toggled that off/on in various places in the R files and committed to master.

paciorek avatar Oct 13 '24 21:10 paciorek