That looks promising, thanks! But how would that work with calling draw()?
Like I can create a new Variable with
new_observed_y = pytensor.tensor.matrix('new_observed_y')
new_lp_cond = vectorize_graph(lp_cond, {observed_y: new_observed_y})
but how do I actually sample from that?
Edit: Okay, I can do
new_observed_y = pytensor.tensor.matrix('new_observed_y')
new_lp_cond = vectorize_graph(lp_cond, {observed_y: new_observed_y})
cdraw = compile_pymc(inputs=[new_observed_y], outputs=new_lp_cond)
cdraw(np.zeros((2, 10)))
But it looks like this method doesn’t sample each prior value individually. It grabs just one set of x0 and k values and uses them for all elements. Is there a way to make sure each element in the input gets its own “fresh” set of samples (like with the draws paramter in pymc.draw())?