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 pyro.poutine.do to avoid duplicate entries in cond_indep_stack #2846

Merged
merged 1 commit into from
May 16, 2021

Conversation

eb8680
Copy link
Member

@eb8680 eb8680 commented May 16, 2021

Resolves #2845

This PR adds a one-line fix to DoMessenger to empty the cond_indep_stack of a duplicated sample site before the handler stack is reapplied. Without this fix, plates may appear twice in the new site's cond_indep_stack, which is incorrect in general and specifically breaks autoguide setup.

Tested:

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.

LGTM!

@eb8680 eb8680 removed the request for review from fritzo May 16, 2021 05:18
@fehiepsi fehiepsi merged commit f13ea00 into dev May 16, 2021
@eb8680 eb8680 deleted the fix-do-plate-duplication branch May 16, 2021 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Runtime error during SVI inference when using poutine.do()
2 participants