MCPcopy Index your code
hub / github.com/dmlc/dgl / test_metis_partition

Function test_metis_partition

tests/python/common/transforms/test_transform.py:724–738  ·  view source on GitHub ↗
(idtype)

Source from the content-addressed store, hash-verified

722)
723@parametrize_idtype
724def test_metis_partition(idtype):
725 # TODO(zhengda) Metis fails to partition a small graph.
726 g = create_large_graph(1000, idtype=idtype)
727 if idtype == F.int64:
728 check_metis_partition(g, 0)
729 check_metis_partition(g, 1)
730 check_metis_partition(g, 2)
731 check_metis_partition_with_constraint(g)
732 else:
733 assert_fail = False
734 try:
735 check_metis_partition(g, 1)
736 except:
737 assert_fail = True
738 assert assert_fail
739
740
741def check_metis_partition_with_constraint(g):

Callers

nothing calls this directly

Calls 3

create_large_graphFunction · 0.85
check_metis_partitionFunction · 0.85

Tested by

no test coverage detected