-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pm.model_graph.model_to_graphviz hangs (powerset computation) #3458
Comments
@rpgoldman, yes, the code is trying to find the set of ancestors that are "one link" away. By "one link" I don't mean that they are |
@lucianopaz Thank you for the clarification. I will see if I can figure this out, but I don't have a good working knowledge of Theano. Here are some conjectures that I hope will inform this PR. If you could sanity check them, it would be very helpful. The The advantage of the current technique is that it avoids having to traverse the Theano graph explicitly -- instead we just walk the powerset and check each element (this is a neat example of an NP algorithm: finding the right element of the powerset is not tractable, but checking an element to see if it's a blanket is relatively easy). We can replace this by using the When we visit a node, we add its parents to the queue unless:
When the search terminates, we return the set of blockers. If this sounds right, I will get it built and submitted. Any suggestions for adding tests to the suite would be helpful; I don't really understand the structure of the test suite. |
@rpgoldman, sorry for the late reply.
Yes, but the term ancestor in
The function
I think this is perfect. |
Closed via #3460 |
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 inpowerset
):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
The text was updated successfully, but these errors were encountered: