pyro.render_model() fails to draw overlapping non-nested plates
See original GitHub issueDue to a shortcoming in graphviz clusters, Pyro’s and NumPyro’s pyro.render_model() currently cannot render overlapping non-nested plates, e.g. the Venn diagram
def model():
plate1 = pyro.plate("plate1", 2, dim=-2)
plate2 = pyro.plate("plate2", 3, dim=-1)
with plate1:
x = pyro.sample("x", dist.Normal(0, 1))
with plate1, plate2:
y = pyro.sample("y", dist.Normal(x, 1))
with plate2:
pyro.sample("z", dist.Normal(y.sum(-2, True), 1), obs=torch.zeros(3))
pyro.render_model(model)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
pyro.render_model() fails to draw overlapping non-nested plates
A more basic problem is that not all plate nesting patterns can be drawn by rectangular overlapping plates. Maybe we could use a...
Read more >Automatically rendering probabilistic graphical models #949
I'd probably go for numpyro.sample and numpyro.plate first. ... pyro.render_model() fails to draw overlapping non-nested plates ...
Read more >Automatic rendering of Pyro models
As pyro.render_model returns an object of type graphviz.dot. ... Note that overlapping non-nested plates may be drawn as multiple rectangles.
Read more >NumPyro Documentation - Read the Docs
SA is the only MCMC method in NumPyro that does not leverage gradients. ... Note that overlapping non-nested plates may be drawn as...
Read more >Automatic rendering of NumPyro models - Google Colab
!pip install -q numpyro@git+https://github.com/pyro-ppl/numpyro ... Note that overlapping non-nested plates may be drawn as multiple rectangles.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that in numpyro, we have
which can be seen as a temporary solution. What do you think @fritzo ?
@fehiepsi NumPyro’s current behavior looks great, and I suspect it’s the only fully general solution 👍 Do you know if that was a recent change, or did I make an error when porting code to Pyro #2962?