cugraph_pyg.data.cugraph_store.EXPERIMENTAL__CuGraphStore#

class cugraph_pyg.data.cugraph_store.EXPERIMENTAL__CuGraphStore(F, G, num_nodes_dict, backend: str = 'torch', multi_gpu: bool = False)[source]#

Duck-typed version of PyG’s GraphStore and FeatureStore.

Attributes:
backend

Methods

create_named_tensor(attr_name, properties, ...)

Create a named tensor that contains a subset of properties in the graph.

get_all_edge_attrs()

Gets a list of all edge types and indices in this store.

get_all_tensor_attrs()

Obtains all tensor attributes stored in this feature store.

get_edge_index(*args, **kwargs)

Synchronously gets an edge_index tensor from the materialized graph.

get_tensor(*args, **kwargs)

Synchronously obtains a FeatureTensorType object from the feature store.

get_tensor_size(*args, **kwargs)

Obtains the size of a tensor given its attributes, or None if the tensor does not exist.

multi_get_tensor(attrs)

Synchronously obtains a FeatureTensorType object from the feature store for each tensor associated with the attributes in attrs.

put_edge_index(edge_index, edge_attr)

Adds additional edges to the graph.

get_vertex_index

put_tensor

__init__(F, G, num_nodes_dict, backend: str = 'torch', multi_gpu: bool = False)[source]#

Constructs a new CuGraphStore from the provided arguments. Parameters ———- F : cugraph.gnn.FeatureStore (Required)

The feature store containing this graph’s features. Typed lexicographic-ordered numbering convention should match that of the graph.

Gdict[tuple[tensor]] (Required)

Dictionary of edge indices. i.e. {

(‘author’, ‘writes’, ‘paper’): [[0,1,2],[2,0,1]], (‘author’, ‘affiliated’, ‘institution’): [[0,1],[0,1]]

} Note: the internal cugraph representation will use offsetted vertex and edge ids.

num_nodes_dictdict (Required)

A dictionary mapping each node type to the count of nodes of that type in the graph.

backend(‘torch’, ‘cupy’) (Optional, default = ‘torch’)

The backend that manages tensors (default = ‘torch’) Should usually be ‘torch’ (‘torch’, ‘cupy’ supported).

multi_gpubool (Optional, default = False)

Whether the store should be backed by a multi-GPU graph. Requires dask to have been set up.

Methods

__init__(F, G, num_nodes_dict[, backend, ...])

Constructs a new CuGraphStore from the provided arguments. Parameters ---------- F : cugraph.gnn.FeatureStore (Required) The feature store containing this graph's features. Typed lexicographic-ordered numbering convention should match that of the graph. G : dict[tuple[tensor]] (Required) Dictionary of edge indices. i.e. { ('author', 'writes', 'paper'): [[0,1,2],[2,0,1]], ('author', 'affiliated', 'institution'): [[0,1],[0,1]] } Note: the internal cugraph representation will use offsetted vertex and edge ids. num_nodes_dict : dict (Required) A dictionary mapping each node type to the count of nodes of that type in the graph. backend : ('torch', 'cupy') (Optional, default = 'torch') The backend that manages tensors (default = 'torch') Should usually be 'torch' ('torch', 'cupy' supported). multi_gpu : bool (Optional, default = False) Whether the store should be backed by a multi-GPU graph. Requires dask to have been set up.

create_named_tensor(attr_name, properties, ...)

Create a named tensor that contains a subset of properties in the graph.

get_all_edge_attrs()

Gets a list of all edge types and indices in this store.

get_all_tensor_attrs()

Obtains all tensor attributes stored in this feature store.

get_edge_index(*args, **kwargs)

Synchronously gets an edge_index tensor from the materialized graph.

get_tensor(*args, **kwargs)

Synchronously obtains a FeatureTensorType object from the feature store.

get_tensor_size(*args, **kwargs)

Obtains the size of a tensor given its attributes, or None if the tensor does not exist.

get_vertex_index(vtypes)

multi_get_tensor(attrs)

Synchronously obtains a FeatureTensorType object from the feature store for each tensor associated with the attributes in attrs.

put_edge_index(edge_index, edge_attr)

Adds additional edges to the graph.

put_tensor(tensor, attr)

Attributes

backend