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

Make trace a subclass of networkx.DiGraph again #1191

Merged
merged 5 commits into from
Sep 15, 2018

Conversation

eb8680
Copy link
Member

@eb8680 eb8680 commented Jun 16, 2018

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 in poutine.Trace have been fixed. The regression tests tests/test_memory.py now pass on this branch with the master branch of networkx.

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.

@eb8680 eb8680 added the Blocked label Jun 16, 2018
@eb8680 eb8680 requested a review from fritzo June 16, 2018 22:33
@eb8680 eb8680 added this to the 0.3.0 release milestone Jun 17, 2018
fritzo
fritzo previously requested changes Jun 18, 2018
Copy link
Member

@fritzo fritzo left a 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

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove before merging

@eb8680
Copy link
Member Author

eb8680 commented Sep 15, 2018

@fritzo should be good to merge now, networkx finally released a new version

Copy link
Member

@fritzo fritzo left a 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
Copy link
Member

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.

@fritzo fritzo merged commit b89519d into pyro-ppl:dev Sep 15, 2018
@fritzo fritzo mentioned this pull request Sep 15, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants