Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #159 from inferno-pytorch/nx2
Browse files Browse the repository at this point in the history
Change networkx API.
  • Loading branch information
constantinpape committed Dec 25, 2018
2 parents 2f51e50 + 0e39158 commit 002cbe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
- conda update -q conda
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
- conda install -c conda-forge networkx=1.11 h5py scikit-image pyyaml dill tensorboardx
- conda install -c conda-forge networkx h5py scikit-image pyyaml dill tensorboardx
- conda install -c pytorch $PYTORCH_CONDA
- conda install -c $TORCHVISION_CHANNEL $TORCHVISION_CONDA

Expand Down
3 changes: 2 additions & 1 deletion inferno/extensions/containers/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ def get_parameters_for_nodes(self, names, named=False):

def clear_payloads(self, graph=None):
graph = self.graph if graph is None else graph
for source, target in graph.edges_iter():
for edge in list(graph.edges(data=True)):
source, target, _ = edge
if 'payload' in graph[source][target]:
del graph[source][target]['payload']

Expand Down

0 comments on commit 002cbe6

Please sign in to comment.