Skip to content

pm.model_graph.model_to_graphviz hangs (powerset computation) #3458

Closed
@rpgoldman

Description

Description of the problem

Trying to generate a graphviz graph of a model containing a normal mixture variable with a lot of parents, ModelGraph._get_ancestors() hangs exploring the powerset of upstream.

Here's the big upstream from my mixture model (from pdb break in powerset):

(Pdb) p iterable
{OR Output_interval__, temperature influences, OR Output, err_sd, OR DO_interval__, modality, od vector, devp, od influences, ideal out, OR IO_interval__, unimodal out, fixed influences, deviation out, medium vector, err_sd_log__, Unimodal or bimodal, OR DO, Unimodal or bimodal_logodds__, medium influences, p(unimodal), p(unimodal)_logodds__, OR IO, temp vector}

Is there a way to do this graphing without searching the powerset? It seems like this won't scale. I don't fully understand what's going on here, but I think the code is trying to calculate a Markov blanket and minimize the size of the graph of the parents of a deterministic variable, but in my case the mixture has three components, each of which is computed by a fairly complex deterministic function.

If there is any interest in addressing this, I will assemble the bits of my model in an executable form, but I believe the issue can be seen by examining the code, without the need for such a case.

Versions and main components

  • PyMC3 Version: 3.6
  • Theano Version: 1.0.4
  • Python Version: 3.7
  • Operating system: MacOS 10.13.6
  • How did you install PyMC3: (conda/pip) pip

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions