probcomp / Gen.jl

A general-purpose probabilistic programming system with programmable inference

Home Page:https://gen.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in documentation of `regenerate`?

ztangent opened this issue · comments

I just tested this on Gen 0.4.5, and this particular claim about choices being retained by regenerate seems to be wrong?

The previous value for `:c` will always be retained.

In particular, if a choice is sampled within an if statement, and the ancestor choice is regenerate s.t. that branch of the if statement no longer gets executed, it seems like regenerate discards that choice, rather than retaining it.

I'm not entirely sure what's meant to be the correct behavior here, but it seems to me that the actual behavior is what we want, and the documented behavior is wrong.