diff --git a/bluefog/common/basics.py b/bluefog/common/basics.py index 84fcebd5..1a6ef48c 100644 --- a/bluefog/common/basics.py +++ b/bluefog/common/basics.py @@ -289,7 +289,7 @@ def set_machine_topology( if not isinstance(topology, networkx.DiGraph): raise TypeError("Machine topology must be a networkx.DiGraph obejct.") - if topology.number_of_nodes != self.machine_size(): + if topology.number_of_nodes() != self.machine_size(): raise TypeError( "topology must be a networkx.DiGraph obejct with same number of nodes " "as bf.machine_size()." @@ -339,7 +339,7 @@ def set_topology( if not isinstance(topology, networkx.DiGraph): raise TypeError("topology must be a networkx.DiGraph obejct.") - if topology.number_of_nodes != self.size(): + if topology.number_of_nodes() != self.size(): raise TypeError( "topology must be a networkx.DiGraph obejct with same number of nodes as bf.size()." )