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

Fix Step #359

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Fix Step #359

merged 2 commits into from
Oct 3, 2024

Conversation

JaimeRZP
Copy link
Member

@JaimeRZP JaimeRZP commented Nov 3, 2023

Fix #350

src/abstractmcmc.jl Outdated Show resolved Hide resolved
@yebai yebai requested a review from devmotion November 3, 2023 10:32
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me -- let's see whether @devmotion is happy too.

@devmotion
Copy link
Member

This will fix the error I ran into, but the more general problem still exists: Since AdvancedHMC adds special keyword arguments to sample, sample and the step and steps iterators/transducers become inconsistent and generic calls of sample in other packages will perform sampling differently from AdvancedHMC because in general n_adapts etc. are not supported by sample and hence can't be provided in such generic situations.

That is, I think to fix these inconsistencies customizations of the sample call should mainly be done via the sampler (e.g., by adding fields that change the behaviour of step).

@yebai
Copy link
Member

yebai commented Nov 7, 2023

I suggest merging this PR for a hotfix; we can remove n_adapts when TuringLang/AbstractMCMC.jl#117 is complete.

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not the ideal approach but it avoids the nasty error at least.

@yebai yebai merged commit 0eee665 into master Oct 3, 2024
14 of 16 checks passed
@yebai yebai deleted the FixStep branch October 3, 2024 13:24
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 this pull request may close these issues.

AbstractMCMC.step interface broken
3 participants