Hi
I was quite surprised to realize that model()
and guide()
may return nothing, e.g. like in SVI tutorial Part I.
For me it was a clear sign of some intended side-effects they’re expected to evoke. Looking deeper I’ve found that pyro.sample
indeed causes some side-effects, but its documentation says almost nothing about it, but rather refers to SVI tutorials Part I and Part II, where I failed to find any details on this. I guess it will be difficult to understand SVI tutorials without clarifying what those side-effects are.
Models, guides and pyro.sample are the central entities of the whole Pyro, so it would be nice to get some more idea on what they really do if their return value could even be ignored.
Thanks in advance for any hints!
UPD.: as I see from sources the side-effect is strongly related with some stack of the messages. Maybe it’s a good idea if someone could add a description of the message stack used?
Valery
Other details
-
What tutorial are you running?
SVI Part I: An Introduction to Stochastic Variational Inference in Pyro — Pyro Tutorials 1.8.4 documentation -
What version of Pyro are you using?
1.3.0