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

Pathfinder: unexpected behavior when num_draws < num_elbo_draws #3268

Closed
WardBrian opened this issue Feb 8, 2024 · 0 comments · Fixed by #3279
Closed

Pathfinder: unexpected behavior when num_draws < num_elbo_draws #3268

WardBrian opened this issue Feb 8, 2024 · 0 comments · Fixed by #3279

Comments

@WardBrian
Copy link
Member

WardBrian commented Feb 8, 2024

Summary:

Reported by @avehtari:

Requesting the number of draws to be some small number and not also changing num_elbo_draws leads to a CSV file of unexpected length.
This is only the case when running single-path pathfinder or setting psis_resample=False. The number of samples returned seems to be max(num_paths*num_draws, num_paths*num_elbo_draws)

Reproducible Steps:

How many draws would you expect the following to return?

./bernoulli data file=bernoulli.data.json pathfinder \
num_psis_draws=100 num_draws=2 psis_resample=0 num_elbo_draws=3 num_paths=2

Our docs suggest the answer should be 2×2 = 4, but it is actually 2×3 = 6.

As an aside, it might be useful if cmdstan was issuing a warning when psis_resample is 0 but a non-default value was given for num_psis_draws.

Current Version:

v2.34.1

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

Successfully merging a pull request may close this issue.

1 participant