-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider changing how update
and regenerate
handle default arguments.
#538
Comments
This makes a lot of sense -- is it fair to think of unspecified default values as implicitly converted to |
Interesting, thanks! I think we could make that part of the spec for update, but it may be hard to support across implementations of the GFI? Alternatively, we could add a new generic implementation of |
When I first introduced support for optional trailing arguments in the Gen dynamic modeling language (see #195), the way I added this functionality to
update
andregenerate
was to assume that default argument vaues would always override the arguments specified in the previous trace thatupdate
orregenerate
was applied to.This behavior was easier to implement, but now that I think about it, quite unnatural: Usually, if you're running a MCMC or SMC algorithm on a trace, you want to keep any optional trailing arguments fixed, rather than having to repeatedly specify their values.
As such, I'm proposing that for any optional trailing arguments that are not explicitly specified in a call to
update
orregenerate
,update
orregenerate
should keep the argument values stored in the previous trace. This would not be hard to implement. It would be a breaking change, but I don't think tons of code relies on the current default behavior because of how unnatural it is.The text was updated successfully, but these errors were encountered: