This PR fixes conversion of some Independent() distributions to/from Funsors. In #491 we changed funsor.tensor.stack from a funsor.Function to an Op, breaking some pattern-matching logic in funsor.to_funsor for distributions (see e.g. eager_beta). This PR fixes that regression and reinstates the failing test cases in test_distribution_generic.py that were removed in #491.
Unblocks https://github.com/pyro-ppl/pyro/pull/2786
This PR fixes conversion of some
Independent()
distributions to/from Funsors. In #491 we changedfunsor.tensor.stack
from afunsor.Function
to anOp
, breaking some pattern-matching logic infunsor.to_funsor
for distributions (see e.g.eager_beta
). This PR fixes that regression and reinstates the failing test cases intest_distribution_generic.py
that were removed in #491.