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

BF: fix ensemble mcmc run after warmup #1918

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

amifalk
Copy link
Contributor

@amifalk amifalk commented Nov 28, 2024

Fixes #1916. The ensemble kernel relies on the batched shape of the rng_key to infer the number of chains but subsets the batched key into a singleton internally. We replicate this behavior in the mcmc.run method when _warmup_state exists by injecting a singleton key into the ensemble state.

@amifalk
Copy link
Contributor Author

amifalk commented Nov 28, 2024

@fehiepsi Looks like linting is failing on files unrelated to this PR. Do you want me to fix them here?

@OlaRonning
Copy link
Member

It looks like they are fixed in #1917, which is merged. If you rebase, the lint should pass.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@fehiepsi
Copy link
Member

Could you rebase the change? You can use something like

git checkout master
git fetch origin master
git rebase origin master
git checkout ensemble-warmup
git merge master
git push [remote to your fork] ensemble-warmup

Copy link
Member

@fehiepsi fehiepsi left a comment

Choose a reason for hiding this comment

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

Thanks @amifalk!

@fehiepsi fehiepsi merged commit 5692d2d into pyro-ppl:master Nov 29, 2024
4 checks passed
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.

MCMC.run gets error after MCMC.warmup with AIES
3 participants