nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

Support AD when nimbleFunction objects are used in models #1453

Closed perrydv closed 3 months ago

perrydv commented 4 months ago

We recently added support (for the imminent release) for using methods of nimbleObjects as user-defined distributions and functions in models.

There were shortcomings in support for AD with these new features. This PR attempts to clean up those gaps and also add tests, which were obviously missing or we would have noticed the shortcomings earlier.

I have locally successfully run test-ADbasics, where most of the new testing resides. Let's see any other issues with CI testing.

Incidental to its main purpose, this PR has several other pieces:

paciorek commented 4 months ago

@perrydv ok to merge given the Win/MacOS failures are unrelated?

perrydv commented 4 months ago

@paciorek I'm more cautious about this branch since it does change some pervasive internals like the distClass objects, even if only slightly. I might have missed the test outcomes. At the moment they are showing as canceled. Did they otherwise run and pass except for the current general test issues we're seeing?

paciorek commented 4 months ago

@perrydv I think my commit was from the GH browser just dealing with a trivial merge conflict.

Linux tests passed on your last commit - Win/Mac failures were unrelated.

So that sounds like we are ready to merge.