cugraph_pyg.sampler.io.BufferedSampleReader#

class cugraph_pyg.sampler.io.BufferedSampleReader(
nodes_call_groups: list[Tensor],
sample_fn: Callable[[...], Iterator[Tuple[Dict[str, Tensor], int, int]]],
*args,
**kwargs,
)[source]#

Iterate over buffered groups of sampling inputs.

Parameters:
nodes_call_groupsIterator[Tuple[torch.Tensor, …]]

Structured groups of node tensors to process in successive sampling calls.

sample_fnCallable

Sampling function called for each input group. It must return an iterator over sampling result tuples.

*args

Additional positional arguments passed to sample_fn.

**kwargs

Additional keyword arguments passed to sample_fn.

__init__(
nodes_call_groups: list[Tensor],
sample_fn: Callable[[...], Iterator[Tuple[Dict[str, Tensor], int, int]]],
*args,
**kwargs,
)[source]#

Methods

__init__(nodes_call_groups, sample_fn, ...)