Skip to content
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

Refactor init logic in pm.sample #7639

Open
jessegrabowski opened this issue Jan 9, 2025 · 0 comments
Open

Refactor init logic in pm.sample #7639

jessegrabowski opened this issue Jan 9, 2025 · 0 comments

Comments

@jessegrabowski
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant