I have read the code more deeply, and now I am definitely confused. As @antoinebaker points out,
This is because a forward sampler can be done using the value of each node conditioned on the values of its parents, and no rejection is necessary because there are no observations that could force you to reject a sample as inconsistent with the evidence.
But when I look at
_draw_values there’s a case for variables that do have observations.
Is that just to make the prior predictive sampler generate the same number of samples as there are observations? Or is this trying to make a sample that is consistent with the observations. I guess I assume that it’s the former, since otherwise we would need to filter out inconsistent samples. It would be nice if there were some comments in the body of
_draw_values to clarify this question.