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

Allow for interventions on constant parameters #597

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

SamWitty
Copy link
Contributor

@SamWitty SamWitty commented Aug 8, 2024

This small PR fixes a bug found in #588 , in which interventions on constant parameters throws various output processing errors. This error occurred because the output processing was attempting to splice intervention assignments into a parameter that was never traced in Pyro, and thus never made its way to the logged output. The intervention was always correctly being applied (to the best of our knowledge), but errors occurred on output processing.

This PR addresses the problem by adding all deterministic parameters to the Pyro trace using pyro.deterministic.

This PR subsumes #594 , which introduced the test case.

closes #588

@SamWitty SamWitty added bug Something isn't working awaiting review PR submitter awaiting code review from reviewer labels Aug 8, 2024
@SamWitty SamWitty self-assigned this Aug 8, 2024
Copy link
Contributor

@anirban-chaudhuri anirban-chaudhuri left a comment

Choose a reason for hiding this comment

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

looks good

@anirban-chaudhuri anirban-chaudhuri merged commit f5c5bec into main Aug 8, 2024
5 checks passed
@anirban-chaudhuri anirban-chaudhuri deleted the swsa-constant-intervention branch August 8, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review PR submitter awaiting code review from reviewer bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sample should allow interventions on constant variables
3 participants