Conversation
ordabayevy
left a comment
There was a problem hiding this comment.
Implementation of Constant Funsor with patterns for substitution, unary, binary, some of the reduction ops, and to_data, to_funsor functions. One use case is in Delta.eager_reduce as lazy Zero terms.
| # XXX obscenely wasteful - need a lazy Zero term | ||
| if point.inputs: | ||
| scale += (point == point).all().log() | ||
| scale += funsor.Constant(point.inputs, Number(0)) |
There was a problem hiding this comment.
This is one use case (and line 191) for Constant term.
|
After working on this I came to a conclusion that the counterpart of |
eb8680
left a comment
There was a problem hiding this comment.
Sorry for such a late review. This mostly looks good, and it's self-contained, so I'm OK merging modulo a few nits. It would be good to sync again about the larger context for this PR since it sounds like your thinking has changed.
|
@eb8680 I made the changes that we discussed over Zoom. |
Addresses #547