diff --git a/.travis.yml b/.travis.yml index c2bc818e..00fe3340 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/inferno/extensions/containers/graph.py b/inferno/extensions/containers/graph.py index 8764ca16..ddce0938 100755 --- a/inferno/extensions/containers/graph.py +++ b/inferno/extensions/containers/graph.py @@ -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']