justindomke / pangolin

probabilistic programming focused on fun
GNU Affero General Public License v3.0
36 stars 1 forks source link

Multiple observed value for a single RV #11

Open xidulu opened 8 months ago

xidulu commented 8 months ago

The code below runs without exceptions, is it desired?

w1 = normal_scale(1, 1)
x = bernoulli(w1)
y = 1
calc = Calculate("numpyro",niter=10000)
ys = calc.sample(w1, [x, x, x], [1, 0, 1])
justindomke commented 8 months ago

Hmmm, looks like the earlier pieces of evidence are simply being ignored now, so the last call is equivalent to:

ys = calc.sample(w1, x, 1)

That's surely bad—we should throw an exception rather than accepting this.