Skip to content

Refactor init logic in pm.sample #7639

Open
@jessegrabowski

Description

@jessegrabowski

Description

We currently have a long list of if/else conditions. but it's needlessly restrictive. Basically the user is allowed to select an initialization mode (jitter, MAP, or advi) and an adaptation mode (adapt_diag, adapt_diag_grad, or adapt_full). Currently some of these combinations are arbitrarily disallowed, for example advi+adapt_diag_grad seems nice.

I propose splitting the incoming string on + and then dispatching to appropriate functions. This would make it easier to implement new initialization or adaptation methods. I can imagine the nutpie fisher loss adaptation, or normalizing flow adaption (or initialization!), being added as choices, for examples.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions