dgl.distributed.load_partitionΒΆ

dgl.distributed.load_partition(part_config, part_id, load_feats=True)[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.

  • load_feats (bool, optional) – Whether to load node/edge feats. If False, the returned node/edge feature dictionaries will be empty. Default: True.

Returns

  • DGLGraph – The graph partition structure.

  • Dict[str, Tensor] – Node features.

  • Dict[(str, str, str), Tensor] – Edge features.

  • GraphPartitionBook – The graph partition information.

  • str – The graph name

  • List[str] – The node types

  • List[(str, str, str)] – The edge types