gigl.distributed.graph_store.messages#

RPC request messages for graph-store operations.

Classes#

FetchABLPInputRequest

Request for fetching ABLP input from a storage server.

FetchNodesRequest

Request for fetching node IDs from a storage server.

InitSamplingBackendRequest

Request to initialize a shared sampling backend on a storage server.

RegisterBackendRequest

Request to register one compute-rank input channel on a backend.

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.

  • server_slice – An optional ServerSlice describing the fraction of this server’s data to return. When None, all of the server’s data is returned.

Examples

Fetch training ABLP input without sharding:

>>> FetchABLPInputRequest(split="train", node_type="user", supervision_edge_type=("user", "to", "item"))

Fetch with a server slice:

>>> FetchABLPInputRequest(split="train", node_type="user",
...     supervision_edge_type=("user", "to", "item"),
...     server_slice=ServerSlice(0, 0, 1, 2))
node_type: gigl.src.common.types.graph_data.NodeType[source]#
server_slice: gigl.distributed.graph_store.sharding.ServerSlice | None = None[source]#
split: Literal['train', 'val', 'test'] | str[source]#
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:
  • split – The split of the dataset to get node ids from.

  • node_type – The type of nodes to get node ids for.

  • server_slice – An optional ServerSlice describing the fraction of this server’s data to return. When None, all of the server’s data is returned.

Examples

Fetch all nodes without sharding:

>>> FetchNodesRequest()

Fetch nodes of a specific type:

>>> FetchNodesRequest(node_type="user")

Fetch the first half of a server’s training nodes:

>>> FetchNodesRequest(split="train", server_slice=ServerSlice(0, 0, 1, 2))
node_type: gigl.src.common.types.graph_data.NodeType | None = None[source]#
server_slice: gigl.distributed.graph_store.sharding.ServerSlice | None = None[source]#
split: Literal['train', 'val', 'test'] | str | None = None[source]#
class gigl.distributed.graph_store.messages.InitSamplingBackendRequest[source]#

Request to initialize a shared sampling backend on a storage server.

Parameters:
  • backend_key – A unique key identifying the backend (e.g. "dist_neighbor_loader_0").

  • worker_options – Options for launching remote sampling workers.

  • sampler_options – Controls which sampler class is instantiated.

  • sampling_config – Configuration for sampling behavior.

backend_key: str[source]#
sampler_options: gigl.distributed.sampler_options.SamplerOptions[source]#
sampling_config: graphlearn_torch.sampler.SamplingConfig[source]#
worker_options: graphlearn_torch.distributed.RemoteDistSamplingWorkerOptions[source]#
class gigl.distributed.graph_store.messages.RegisterBackendRequest[source]#

Request to register one compute-rank input channel on a backend.

Parameters:
  • backend_id – The ID of the backend to register on.

  • worker_key – A unique key identifying this compute-rank channel.

  • sampler_input – The input data for sampling.

  • sampling_config – Configuration for sampling behavior.

  • buffer_capacity – Number of shared-memory buffer slots.

  • buffer_size – Size of each buffer slot (int bytes or string like "1MB").

backend_id: int[source]#
buffer_capacity: int[source]#
buffer_size: int | str[source]#
sampler_input: graphlearn_torch.sampler.NodeSamplerInput | graphlearn_torch.sampler.EdgeSamplerInput | graphlearn_torch.sampler.RemoteSamplerInput | gigl.distributed.sampler.ABLPNodeSamplerInput[source]#
sampling_config: graphlearn_torch.sampler.SamplingConfig[source]#
worker_key: str[source]#