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 and the one-time sampling-error guard.

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.