Skip to content

Shake up TestUtils.run_ad interface again #1309

@penelopeysm

Description

@penelopeysm
  1. We need to get rid of the VarInfo argument. Given that you can just pass a transform strategy instead, it serves very little use now...

apart from

allowing people to stick values inside it with unflatten, and then those values become the values that are used for gradient preparation. We actually use that in ADTests to demonstrate that ReverseDiffCompiled fails sometimes. There are two ways around this:

  1. Declare that this usage is just way too advanced, and unnecessary. We can hardcode the ADTests table to show that it's wrong.
  2. Put another keyword argument on LogDensityFunction, that allows users to control the parameters used for gradient prep, and then put a keyword argument on run_ad that forwards to the LDF.

Finally, we need to:

  • get rid of the varinfo field in the ADResult (arguably it should just straight up store the LDF)

That is easy to do, but it's breaking, so it will have to go in the next minor version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions