Skip to content
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

Document that ParamUpdate(..., gf) will only update parameters initialized at the time of construction #455

Open
alex-lew opened this issue Mar 3, 2022 · 0 comments

Comments

@alex-lew
Copy link
Contributor

alex-lew commented Mar 3, 2022

ParamUpdate objects track sets of parameters to update. When a ParamUpdate is constructed, the user can manually provide a list of parameters it should track, or the user can pass in a generative function, with the meaning "track all parameters owned by this generative function."

However, when the generative function is written in the dynamic DSL, Gen has no way of knowing what parameters the GF introduces unless the user explicitly initializes them. When the ParamUpdate object is created before the parameters are initialized, the parameters do not end up tracked by the ParamUpdate object.

This leads to counterintuitive order-dependent behavior, as in #414.

We should at the very least document this behavior. Even better would be to find a way to get around it, e.g. by having a different kind of ParamObject that, whenever necessary, checked the GF in question for newly initialized parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant