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

Code future #169

Open
nstarman opened this issue Aug 30, 2023 · 3 comments
Open

Code future #169

nstarman opened this issue Aug 30, 2023 · 3 comments

Comments

@nstarman
Copy link
Contributor

nstarman commented Aug 30, 2023

numpyro and some others can auto-render their PGM, not relying on daft. They build a graphviz Graph and render that to matplotlib.

I was thinking that daft could keep its UI, but internally build a NetworkX graph (which can convert to a graphviz object). Daft could then support many different rendering options -- matplotlib, plotly, Vega, etc — by plugin (entrypoint modules), just by rendering the NetworkX graph. Also the NetworkX graph is a useful object in itself, with nice serialization options and customization, etc.

Perhaps numpyro could then make daft a dependency, esp if it supports a number of rendering options.

@dfm
Copy link
Member

dfm commented Aug 30, 2023

I'm not very interested in this proposal because the whole point of developing daft in the first place was to enable manual placement of nodes (often needed to get publication quality PGMs) which was/is? a PITA with the standard network visualization tools. I believe that it fills a very different niche than the tools you're looking at!

@nstarman
Copy link
Contributor Author

nstarman commented Aug 30, 2023

NetworkX allows for the nodes to be anything / any metadata to be added to a node, e.g. a daft Node that holds the position information.
By leveraging a network library it would be easier to do things like add two PGM.
My idea is to separate the rendering layer from the graph, where the graph still holds necessary information like node type (observed vs alternate), position, etc.

@dfm
Copy link
Member

dfm commented Aug 30, 2023

Got it. If you think having networkx provide a data structure, and if you feel that comes with benefits, I'm happy to chat! I feel like the comparison to automated rendering from those PPL libraries is a big of a red herring, that's all.

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

No branches or pull requests

2 participants