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

Directly convert IndependentDistribution to base distribution #443

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

eb8680
Copy link
Member

@eb8680 eb8680 commented Jan 26, 2021

Addresses #386. Should unblock #427.

This PR modifies to_funsor conversion of IndependentDistributions to directly modify parameter inputs and outputs via funsor.Lambda rather than representing them with funsor.terms.Independent, which was breaking some pattern matching in #427.

Tested:

Copy link
Member

@fritzo fritzo left a comment

Choose a reason for hiding this comment

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

LGTM once tests pass.

In the longer term will we deprecate Independent in favor of Lambda?

@eb8680
Copy link
Member Author

eb8680 commented Jan 26, 2021

In the longer term will we deprecate Independent in favor of Lambda?

I'm not sure, I guess it depends on how much it ends up being used in places that are closer to user code.

@fritzo fritzo merged commit a23e2f3 into master Jan 26, 2021
@fritzo fritzo deleted the direct-indepdist-conversion branch January 26, 2021 23:57
@fritzo fritzo mentioned this pull request Jan 27, 2021
4 tasks
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.

2 participants