Skip to content

Directly convert IndependentDistribution to base distribution - #443

Merged
fritzo merged 1 commit into
masterfrom
direct-indepdist-conversion
Jan 26, 2021
Merged

Directly convert IndependentDistribution to base distribution#443
fritzo merged 1 commit into
masterfrom
direct-indepdist-conversion

Conversation

@eb8680

@eb8680 eb8680 commented Jan 26, 2021

Copy link
Copy Markdown
Member

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:

@fritzo fritzo left a comment

Copy link
Copy Markdown
Member

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

eb8680 commented Jan 26, 2021

Copy link
Copy Markdown
Member Author

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