gigl.distributed.dist_neighbor_sampler#

Classes#

DistNeighborSampler

GiGL's k-hop distributed neighbor sampler supporting both standard and ABLP inputs.

Module Contents#

class gigl.distributed.dist_neighbor_sampler.DistNeighborSampler(*args, **kwargs)[source]#

Bases: gigl.distributed.base_sampler.BaseDistNeighborSampler

GiGL’s k-hop distributed neighbor sampler supporting both standard and ABLP inputs.

Extends BaseGiGLSampler (which provides shared input preparation utilities) and overrides _sample_from_nodes with a k-hop neighbor sampling loop.

Supports both NodeSamplerInput (standard neighbor sampling) and ABLPNodeSamplerInput (anchor-based link prediction with supervision nodes).

For ABLPNodeSamplerInput, supervision nodes (positive/negative labels) are added to the sampling seeds, and label information is included in the output metadata.

Initialize the sampler, its fused feature lookups, and the one-time sampling-error guard.

Every node or edge type that has features, whether a raw float store, a packed uint8 sidecar, or both, is fetched through one FusedDistFeature per entity kind, with one request per partition per type. They are stored in GLT’s dist_node_feature and dist_edge_feature attributes.

GLTDistNeighborSampler has no GiGL-owned state; we only add _sampling_error_sent so _send_adapter can forward at most one poison pill per sampler instance. Initializing it here (rather than lazily) guarantees the failure handler never raises AttributeError, which GLT’s event loop would swallow the same way it swallows the original sampling exception.