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

Fixed method ambiguity for MALA #102

Merged
merged 3 commits into from
Sep 23, 2024
Merged

Fixed method ambiguity for MALA #102

merged 3 commits into from
Sep 23, 2024

Conversation

torfjelde
Copy link
Member

If we forget to pass initial parameters to MALA, we encounter

propose(rng::Random.AbstractRNG, ::MALA, model) = error("please specify initial parameters")

which is currently causing method ambiguities.

I've added both a fix + explicit testing of this scenario.

@mhauru
Copy link
Member

mhauru commented Sep 23, 2024

The test failure is only on nightly, but it seems it's only a case of Fortune being against us:

   Expression: (mean(chain3.μ), 0.0, atol = 0.1)
   Evaluated: -0.10015010264804329  0.0 (atol=0.1)

Unless the current atol is already a safe bound that should never come even close to being violated, may be worth relaxing it a tiny bit.

Copy link
Member

@mhauru mhauru left a comment

Choose a reason for hiding this comment

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

LGTM

@torfjelde torfjelde merged commit 4442783 into master Sep 23, 2024
12 of 17 checks passed
@torfjelde torfjelde deleted the torfjelde/ambiguity-fix branch September 23, 2024 13:57
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.

3 participants