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

Make poutine.reparam compatible with InitMessenger, poutine.condition, etc. #2878

Open
4 tasks
fritzo opened this issue Jun 18, 2021 · 0 comments
Open
4 tasks

Comments

@fritzo
Copy link
Member

fritzo commented Jun 18, 2021

This issue tracks design choices about the relationship between ReparamMessenger and other messengers that set msg["value"] such as InitMessenger, ConditionMessenger, and ReplayMessenger.

The problem is that poutine.reparam is usually applied directly to a model, often inside the model at a specific site, whereas the value-setting effect handlers are usually applied as part of inference or prediction, after or outside of poutine.reparam. As a result, the model has already been rewritten by the time a value-modifying handler sees its target sample site. This situation would be fine in a fully general lightweight effect handler system where handlers could arbitrarily modify the effects of other handlers, but Pyro's effect handlers are organized around the simplifying concept of a handler stack, limiting effects to a small safe set of application orders. Thus solutions to this issue will need to work around the stack, e.g. by adding additional global handler state, directly inspecting the stack, or applying messengers out-of-stack-order.

Tasks

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

No branches or pull requests

1 participant