Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 17, 2023
1 parent 3785268 commit 8a68357
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions torch_geometric/distributed/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,13 @@ def generate_partition(self):
global_row = global_row[perm]
edge_id = edge_id[perm]

assert torch.equal(self.data.edge_index[:, edge_id], torch.stack((global_row, global_col)))
assert torch.equal(self.data.edge_index[:, edge_id],
torch.stack((global_row, global_col)))
if 'edge_attr' in part_data:
edge_attr = part_data.edge_attr[perm]
assert torch.equal(self.data.edge_attr[edge_id,:], edge_attr)

assert torch.equal(self.data.edge_attr[edge_id, :],
edge_attr)

torch.save(
{
'edge_id': edge_id,
Expand Down

0 comments on commit 8a68357

Please sign in to comment.