Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Oct 14, 2024
1 parent beab715 commit 43df3ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions python/dgl/distributed/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,7 @@ def get_homogeneous(g, balance_ntypes):
int(F.as_scalar(inner_nids[-1])) + 1,
]
)
val = np.cumsum(
val
).tolist() # note computing the cumulative sum of array elements.
val = np.cumsum(val).tolist()
assert val[-1] == g.num_nodes(ntype)
for etype in g.canonical_etypes:
etype_id = g.get_etype_id(etype)
Expand Down
2 changes: 2 additions & 0 deletions tools/distpartitioning/dataset_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ def get_dataset(
autogenerate_column_names=True,
)
parse_options = pyarrow.csv.ParseOptions(delimiter=" ")
# if getsize() == 0, the file is empty, indicating that the partition doesn't have this attribute.
# The src_ids and dst_ids should remain empty.
if os.path.getsize(edge_file) != 0:
with pyarrow.csv.open_csv(
edge_file,
Expand Down

0 comments on commit 43df3ca

Please sign in to comment.