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 FoldedDistribution conditioning behavior #138

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Conversation

eb8680
Copy link
Contributor

@eb8680 eb8680 commented Jun 9, 2023

Extracted from #130. Blocking #130 #131 #132 #133 #134

This PR fixes an edge case that came up in #130: FoldedDistributions are subclasses of TransformedDistribution in Pyro, but the Transforms they use don't implement inversion so they aren't compatible with the logic for standard TransformedDistributions in causal_pyro.counterfactual.handlers.ambiguity.

This bug is not specific to FoldedDistribution, but because PyTorch Distributions and Transforms are so resistant to introspection it has to be dealt with case-by-case. I'm adding the fix for this case now because it is blocking #10.

@eb8680 eb8680 added bug Something isn't working status:awaiting review Awaiting response from reviewer labels Jun 9, 2023
@eb8680 eb8680 requested a review from SamWitty June 9, 2023 12:29
@eb8680 eb8680 added this to the Initial public release milestone Jun 9, 2023
Copy link
Collaborator

@SamWitty SamWitty 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

@SamWitty SamWitty merged commit e13e7c6 into master Jun 12, 2023
@eb8680 eb8680 deleted the eb-folded-fix branch August 7, 2023 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:awaiting review Awaiting response from reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants