You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Handlers earlier in the PYRO_STACK are applied first.
If we run:
trace(replay(model, guide_trace)).get_trace(...)
We end up (somewhere during the execution of the above line) with a PYRO_STACK with the first item referencing trace, and the second item referencing replay. But when we hit apply_stack, because of the reverse order in which the handlers are applied, replay is applied first. So, the comments should read, # Handlers *later* in the PYRO_STACK are applied first., correct?
When a Messenger sets the "stop" field of a message,
it prevents any Messengers above it on the stack from being applied.
really be:
When a Messenger sets the "stop" field of a message,
it prevents any Messengers below it on the stack from being applied.
And
A Messenger that sets msg["stop"] == True also prevents application
of postprocess_message by Messengers above it on the stack
via the pointer variable from the process_message loop
should really be:
A Messenger that sets msg["stop"] == True also prevents application
of postprocess_message by Messengers below it on the stack
via the pointer variable from the process_message loop
I could be convinced to interpret all this otherwise, but I guess this was my default interpretation. Am I way off-base?
The text was updated successfully, but these errors were encountered:
I really like that minipyro is in here for those interested in the internals of pyro. Super awesome!
Some of the wording in the module, particularly regarding
PYRO_STACK
, is confusing to me, though.For example:
pyro/pyro/contrib/minipyro.py
Line 48 in dc7b964
If we run:
We end up (somewhere during the execution of the above line) with a
PYRO_STACK
with the first item referencingtrace
, and the second item referencingreplay
. But when we hitapply_stack
, because of the reverse order in which the handlers are applied,replay
is applied first. So, the comments should read,# Handlers *later* in the PYRO_STACK are applied first.
, correct?Similarly, in
pyro/pyro/contrib/minipyro.py
Line 164 in dc7b964
Shouldn't
really be:
And
should really be:
I could be convinced to interpret all this otherwise, but I guess this was my default interpretation. Am I way off-base?
The text was updated successfully, but these errors were encountered: