gigl.distributed.sampler#
Attributes#
Classes#
Sampler input specific for ABLP use case. Contains additional information about positive labels, negative labels, and the corresponding |
Module Contents#
- class gigl.distributed.sampler.ABLPNodeSamplerInput(node, input_type, positive_label_by_edge_types, negative_label_by_edge_types)[source]#
Bases:
graphlearn_torch.sampler.NodeSamplerInputSampler input specific for ABLP use case. Contains additional information about positive labels, negative labels, and the corresponding supervision node type
- Parameters:
node (torch.Tensor) – Anchor nodes to fanout from
input_type (Optional[Union[str, NodeType]]) – Node type of the anchor nodes
positive_label_by_edge_types (dict[EdgeType, torch.Tensor]) – Positive label nodes to fanout from
negative_label_by_edge_types (dict[EdgeType, torch.Tensor]) – Negative label nodes to fanout from
- Return type:
- property negative_label_by_edge_types: dict[gigl.src.common.types.graph_data.EdgeType, jaxtyping.Int64[torch.Tensor, anchors _negative_labels_per_anchor]][source]#
- Return type:
dict[gigl.src.common.types.graph_data.EdgeType, jaxtyping.Int64[torch.Tensor, anchors _negative_labels_per_anchor]]
- property positive_label_by_edge_types: dict[gigl.src.common.types.graph_data.EdgeType, jaxtyping.Int64[torch.Tensor, anchors _positive_labels_per_anchor]][source]#
- Return type:
dict[gigl.src.common.types.graph_data.EdgeType, jaxtyping.Int64[torch.Tensor, anchors _positive_labels_per_anchor]]
- gigl.distributed.sampler.EDGE_PACKED_FEATURES_METADATA_KEY: Final[str] = 'edge_packed_features'[source]#