-
-
Notifications
You must be signed in to change notification settings - Fork 984
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
Make trace a subclass of networkx.DiGraph again #1191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Could you also pin the networkx version in this PR, say in both setup.py and docs/requirements.txt
networkx>=2.2
pyro/poutine/trace_struct.py
Outdated
def __init__(self, *args, **kwargs): | ||
""" | ||
:param string graph_type: string specifying the kind of trace graph to construct | ||
|
||
Constructor. Currently identical to :meth:`networkx.DiGraph.__init__`, | ||
except for storing the graph_type attribute | ||
""" | ||
self._graph = DiGraph(*args, **kwargs) | ||
# self._graph = DiGraph(*args, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove before merging
@fritzo should be good to merge now, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woo hoo!
@@ -4,5 +4,5 @@ numpy>=1.7 | |||
contextlib2 | |||
cloudpickle>=0.3.1 | |||
graphviz>=0.8 | |||
networkx>=2.0.0 | |||
networkx>=2.2rc1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's just remember to update this to >=2.2
before the next Pyro release.
This PR removes some of the cruft in
poutine.Trace
introduced in #801.After networkx/networkx#3014 the memory leaks that required a wrapper around
networkx.DiGraph
inpoutine.Trace
have been fixed. The regression teststests/test_memory.py
now pass on this branch with the master branch ofnetworkx
.This PR should not be merged until the next minor release of
networkx
. According to networkx/networkx#2885 that should happen fairly soon, so I'm tentatively adding this to the 0.3 release milestone.