Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
bump compat of AdvancedHMC #2050
bump compat of AdvancedHMC #2050
Changes from 12 commits
7175c1d
5e2ed5a
01f835e
9e130d2
ebeade8
3045bb2
a6838c1
d8ccd8d
8f51898
0581174
bbd890c
476f90c
1ade2fd
b3b1d33
05a2dba
1125f72
a1fcb21
6838b4e
307040e
2bf8beb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means users will get more than the requested
N
samples - I think this should be reverted?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a change in how the number of adaptions is handled in the external sampler interface. Instead of storing
n_adapts
in the sampling algorithm (see here), we now only pass them in theAbstractMCMC.sample
call. This means there is no adaption by default if the change is reverted.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can set
disgard_initial = n_adapts
here so we have a default adaption but will return the same number of MCMC samples. In addition, we can allow the user to pass an_adapt
argument to override the default adaption settings.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we have to take into account the adaption steps - but changing this line here means that a call such as
sample(model, NUTS(), 10)
will return not 10 but 1010 samples? These discarded steps only have to be specified as keyword argument but not added to the positional argument (number of samples). AbstractMCMC will addeddiscard_initial
to these internally to the requested number of samples automatically.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out we have a typo in tests: we already explicitly pass the
n_adapts
argument to thesample
function. Due to the typo, AHMC complains about missingn_adapts
. After correcting this typo, these default values are no longer necessary. More generally, we should introduce default options forn_adapts
in the AbstractMCMC package; see this PR.