dgl.distributed.partition.load_partition

dgl.distributed.partition.load_partition(part_config, part_id)[source]

Load data of a partition from the data path.

A partition data includes a graph structure of the partition, a dict of node tensors, a dict of edge tensors and some metadata. The partition may contain the HALO nodes, which are the nodes replicated from other partitions. However, the dict of node tensors only contains the node data that belongs to the local partition. Similarly, edge tensors only contains the edge data that belongs to the local partition. The metadata include the information of the global graph (not the local partition), which includes the number of nodes, the number of edges as well as the node assignment of the global graph.

The function currently loads data through the local filesystem interface.

Parameters
  • part_config (str) – The path of the partition config file.

  • part_id (int) – The partition Id.

Returns

  • DGLGraph – The graph partition structure.

  • dict of tensors – Node features.

  • dict of tensors – Edge features.

  • GraphPartitionBook – The graph partition information.

  • str – The graph name