镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Code future #169

Open
Open

Description

@nstarman

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.

Activity

  1. dfm commented on Aug 30, 2023

    @dfm
    Member

    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!

  2. nstarman commented on Aug 30, 2023

    @nstarman
    ContributorAuthor

    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.

  3. dfm commented on Aug 30, 2023

    @dfm
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions