gigl.distributed.graph_store.messages#
RPC request messages for graph-store fetch operations.
Classes#
Request for fetching ABLP input from a storage server. |
|
Request for fetching node IDs from a storage server. |
Module Contents#
- class gigl.distributed.graph_store.messages.FetchABLPInputRequest[source]#
Request for fetching ABLP input from a storage server.
- Parameters:
split – The split of the dataset to get ABLP input from.
node_type – The type of anchor nodes to retrieve.
supervision_edge_type – The edge type used for supervision.
rank – The rank of the process requesting ABLP input. Must be provided together with
world_size.world_size – The total number of processes in the distributed setup. Must be provided together with
rank.
Examples
Fetch training ABLP input without sharding:
>>> FetchABLPRequest(split="train", node_type="user", supervision_edge_type=("user", "to", "item"))
Fetch training ABLP input for rank 0 of 4:
>>> FetchABLPRequest(split="train", node_type="user", supervision_edge_type=("user", "to", "item"), rank=0, world_size=4)
- validate()[source]#
Validate that the request has consistent rank/world_size.
- Raises:
ValueError – If only one of
rankorworld_sizeis provided.- Return type:
None
- supervision_edge_type: gigl.src.common.types.graph_data.EdgeType[source]#
- class gigl.distributed.graph_store.messages.FetchNodesRequest[source]#
Request for fetching node IDs from a storage server.
- Parameters:
rank – The rank of the process requesting node ids. Must be provided together with
world_size.world_size – The total number of processes in the distributed setup. Must be provided together with
rank.split – The split of the dataset to get node ids from.
node_type – The type of nodes to get node ids for.
Examples
Fetch all nodes without sharding:
>>> FetchNodesRequest()
Fetch training nodes for rank 0 of 4:
>>> FetchNodesRequest(rank=0, world_size=4, split="train")
Fetch nodes of a specific type:
>>> FetchNodesRequest(node_type="user")