You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is target_accept a kwarg to pm.sample() or just another **kwargs? The argument isn't even included in the API docs, so if it's the former, there's a bigger problem.
I mean, it's detailed here, but I assumed that the sampling defaults would be specified deeper in the code, possibly allowing for different default for different sampling algorithms.
Exactly. But those are each specified separately and, it turns out, in a way that creates different defaults for different algorithms. So I'm not sure what's missing from the docs.
Exactly. But those are each specified separately and, it turns out, in a way that creates different defaults for different algorithms. So I'm not sure what's missing from the docs.
I couldn't figure out what the default is as an advanced user. Since it's common advice to increase it (even automatic in case of divergences) it should be easy to find what the default is.
This is caused by pm.sample() being a franken-wrapper that dispatches to a bunch of actual sampling methods, but seems like it does something useful all on its own. Where would you expect the default value to be documented?
Activity
kdotmanoj commentedon Aug 14, 2024
can you provide more info about this?
ricardoV94 commentedon Aug 14, 2024
I think it's pretty self explanatory.
ricardoV94 commentedon Aug 14, 2024
It's a keyword argument to pm.sample
kdotmanoj commentedon Aug 14, 2024
so the value is 0.8 right, found here:
i am finding it difficult to find where to edit as it is autogenerated from the code.
ricardoV94 commentedon Aug 14, 2024
You're looking at nutpie sample function not pymc
cluhmann commentedon Aug 15, 2024
Is
target_accept
a kwarg topm.sample()
or just another**kwargs
? The argument isn't even included in the API docs, so if it's the former, there's a bigger problem.I mean, it's detailed here, but I assumed that the sampling defaults would be specified deeper in the code, possibly allowing for different default for different sampling algorithms.
Armavica commentedon Aug 15, 2024
There are at least a couple places where a default is provided deep in the code:
pymc/pymc/sampling/mcmc.py
Line 730 in 747fda3
pymc/pymc/sampling/jax.py
Line 478 in 747fda3
pymc/pymc/step_methods/hmc/hmc.py
Line 119 in 747fda3
pymc/pymc/step_methods/hmc/base_hmc.py
Line 72 in 747fda3
cluhmann commentedon Aug 15, 2024
Exactly. But those are each specified separately and, it turns out, in a way that creates different defaults for different algorithms. So I'm not sure what's missing from the docs.
ricardoV94 commentedon Aug 15, 2024
I couldn't figure out what the default is as an advanced user. Since it's common advice to increase it (even automatic in case of divergences) it should be easy to find what the default is.
cluhmann commentedon Aug 15, 2024
This is caused by
pm.sample()
being a franken-wrapper that dispatches to a bunch of actual sampling methods, but seems like it does something useful all on its own. Where would you expect the default value to be documented?ricardoV94 commentedon Aug 15, 2024
pm.sample 🤷♂️🫠🥹? Or do you have a better idea?
cluhmann commentedon Aug 16, 2024
But ... it's not an argument to
pm.sample()
. I do have a better idea, but you didn't like it (e.g., deprecatepm.sample
). 😂ricardoV94 commentedon Aug 16, 2024
It is, just hidden inside **kwargs.
It's actually a special kwarg, the only one we accept both directly and as usual step kwargs
ricardoV94 commentedon Aug 16, 2024
See #5622
kdotmanoj commentedon Aug 16, 2024
@ricardoV94 do you suggest mentioning the default values of
target_accept
here ?