Pyro: [FR] Improve save_visualization's functionality

Created on 30 Oct 2018  路  4Comments  路  Source: pyro-ppl/pyro

Hi All. It would be nice (especially for new users / researchers) if there was an easy way to get a visual of their model via plate notation. I think for most models this would be (reasonably) easy to do via executing a trace on a model and interfacing with Daft (http://daft-pgm.org) or a similar package. Thoughts?

enhancement good first issue help wanted

Most helpful comment

Hi @eb8680 , yes was considering doing this myself, but had avoided starting for this very reason. So long as it can throw an error if it doesn't fit the "simple structure" , and this can be diagnosed. It'll be on my todo in future if no-one else (outside the main team) picks it up.

All 4 comments

@robsalomone interesting idea, and thanks for the pointer to Daft - seems like a nice package! It's unlikely that we'll get to this ourselves, but I agree it would be nice to have and it seems like a great project for someone interested in contributing to Pyro.

Note that in Pyro we don't always have the true conditional independence structure of a model easily available to us, only a coarse approximation, and additionally some Pyro models can't be represented as graphical models with fixed structure. However, there are many models for which these difficulties don't apply and for which a translation from a Trace to Daft would be straightforward.

Hi @eb8680 , yes was considering doing this myself, but had avoided starting for this very reason. So long as it can throw an error if it doesn't fit the "simple structure" , and this can be diagnosed. It'll be on my todo in future if no-one else (outside the main team) picks it up.

Taking a look at pyro.save_visualization might be a good start. :)

@fehiepsi thanks for that. I somehow managed to miss that function, it should make things much easier.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fritzo picture fritzo  路  4Comments

ahmadsalim picture ahmadsalim  路  3Comments

neerajprad picture neerajprad  路  4Comments

null-a picture null-a  路  4Comments

fehiepsi picture fehiepsi  路  4Comments