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

Commit 002cbe6

Browse files
Merge pull request #159 from inferno-pytorch/nx2
Change networkx API.
2 parents 2f51e50 + 0e39158 commit 002cbe6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ install:
1919
- conda update -q conda
2020
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
2121
- source activate test-environment
22-
- conda install -c conda-forge networkx=1.11 h5py scikit-image pyyaml dill tensorboardx
22+
- conda install -c conda-forge networkx h5py scikit-image pyyaml dill tensorboardx
2323
- conda install -c pytorch $PYTORCH_CONDA
2424
- conda install -c $TORCHVISION_CHANNEL $TORCHVISION_CONDA
2525

inferno/extensions/containers/graph.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,8 @@ def get_parameters_for_nodes(self, names, named=False):
386386

387387
def clear_payloads(self, graph=None):
388388
graph = self.graph if graph is None else graph
389-
for source, target in graph.edges_iter():
389+
for edge in list(graph.edges(data=True)):
390+
source, target, _ = edge
390391
if 'payload' in graph[source][target]:
391392
del graph[source][target]['payload']
392393

0 commit comments

Comments
 (0)