pyro-ppl / funsor

Functional tensors for probabilistic programming
https://funsor.pyro.ai
Apache License 2.0
236 stars 20 forks source link

Constant Funsor #548

Closed ordabayevy closed 3 years ago

ordabayevy commented 3 years ago

Addresses #547

fritzo commented 3 years ago

@eb8680 I wonder if we could remove sample_inputs from MonteCarlo and instead read those from a constant funsor. E.g. in #549 I'm struggling with MonteCarlo introducing sample inputs in adjoint, and a possible simplification would be to add a Constant funsor to the root 🤔

ordabayevy commented 3 years ago

After working on this I came to a conclusion that the counterpart of ProvenanceTensor is not Constant funsor but something more like Delta. So the to_funsor and to_data patterns should be removed from this PR I believe.

ordabayevy commented 3 years ago

@eb8680 I made the changes that we discussed over Zoom.