Edge cuts between partitions

Is there a way to find the edge cuts between the partitions of a graph created by the partitioning script mentioned in the distributed training docs? I am using the following partitioning script -

import dgl
import torch as th
from ogb.nodeproppred import DglNodePropPredDataset
data = DglNodePropPredDataset(name='ogbn-arxiv')
graph, labels = data[0]
labels = labels[:, 0]
graph.ndata['labels'] = labels

splitted_idx = data.get_idx_split()
train_nid, val_nid, test_nid = splitted_idx['train'], splitted_idx['valid'], splitted_idx['test']
train_mask = th.zeros((graph.number_of_nodes(),), dtype=th.bool)
train_mask[train_nid] = True
val_mask = th.zeros((graph.number_of_nodes(),), dtype=th.bool)
val_mask[val_nid] = True
test_mask = th.zeros((graph.number_of_nodes(),), dtype=th.bool)
test_mask[test_nid] = True
graph.ndata['train_mask'] = train_mask
graph.ndata['val_mask'] = val_mask
graph.ndata['test_mask'] = test_mask

dgl.distributed.partition_graph(graph, graph_name='ogbn-arxiv', num_parts=4,
                                out_path='arxiv-4',
                                balance_ntypes=graph.ndata['train_mask'],
                                balance_edges=True)

The partition algorithm underlying partition_graph() is METIS and it does not return the edge cuts.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.