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

Add an option to the sample function to force using SimpleVarInfo. #2213

Closed
yebai opened this issue May 1, 2024 · 0 comments
Closed

Add an option to the sample function to force using SimpleVarInfo. #2213

yebai opened this issue May 1, 2024 · 0 comments

Comments

@yebai
Copy link
Member

yebai commented May 1, 2024

Turing, by default, uses VarInfo for sampling. There are a growing number of cases where we want to use SimpleVarInfo, e.g.

compintell/Mooncake.jl#95 (comment)

At the moment, one has to hack into the internals to do this. Let's add an option to force using SimpleVarInfo tracing type by passing an additional argument to the sample function.

In addition, let's also allow users to pass adtype to the sample(; adtype=AutoForwardDiff), which would override Turing's default choice of adtype but still takes low precedence over inference algorithms' own autodiff choice via, e.g., NUTS(;adtype=AutoReverseDiff).

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

No branches or pull requests

1 participant