Skip to content

Commit

Permalink
Update basics.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BichengYing committed Mar 28, 2021
1 parent cc16cff commit d435860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bluefog/common/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()."
Expand Down Expand Up @@ -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()."
)
Expand Down

0 comments on commit d435860

Please sign in to comment.