gigl.distributed.dist_sampling_producer#
Attributes#
Classes#
A subprocess group of distributed sampling workers. |
Module Contents#
- class gigl.distributed.dist_sampling_producer.DistSamplingProducer(data, sampler_input, sampling_config, worker_options, channel, sampler_options, degree_tensors=None)[source]#
Bases:
graphlearn_torch.distributed.DistMpSamplingProducerA subprocess group of distributed sampling workers.
Note that this producer is only used for workload with separate sampling and training, all sampled results will be sent to the output channel.
- Parameters:
data (graphlearn_torch.distributed.DistDataset)
sampler_input (Union[graphlearn_torch.sampler.NodeSamplerInput, graphlearn_torch.sampler.EdgeSamplerInput])
sampling_config (graphlearn_torch.sampler.SamplingConfig)
worker_options (graphlearn_torch.distributed.MpDistSamplingWorkerOptions)
channel (graphlearn_torch.channel.ChannelBase)
sampler_options (gigl.distributed.sampler_options.SamplerOptions)
degree_tensors (Optional[Union[torch.Tensor, dict[graphlearn_torch.typing.NodeType, torch.Tensor]]])
- shutdown()[source]#
Stops the sampling workers, waiting at most
MP_STATUS_CHECK_INTERVALin total.Same as GLT’s
DistMpSamplingProducer.shutdown[1] except that the grace period is a single deadline shared by all workers. Seejoin_workers_with_shared_deadline().[1]: alibaba/graphlearn-for-pytorch
- Return type:
None