cugraph_service_server.cugraph_handler.CugraphHandler#

class cugraph_service_server.cugraph_handler.CugraphHandler[source]#

Class which handles RPC requests for a cugraph_service server.

Attributes:
is_multi_gpu

True if the CugraphHandler has multiple GPUs available via a dask cluster.

num_gpus

If dask is not available, this returns “1”. Otherwise it returns the number of GPUs accessible through dask.

Methods

batched_ego_graphs(seeds, radius, graph_id)

call_extension(func_name, func_args_repr, ...)

Calls the extension function func_name and passes it the eval'd func_args_repr and func_kwargs_repr objects.

call_graph_creation_extension(func_name, ...)

Calls the graph creation extension function func_name and passes it the eval'd func_args_repr and func_kwargs_repr objects.

create_graph()

Create a new graph associated with a new unique graph ID, return the new graph ID.

create_test_array(nbytes)

Creates an array of bytes (int8 values set to 1) and returns an ID to use to reference the array in later test calls.

delete_graph(graph_id)

Remove the graph identified by graph_id from the server.

delete_test_array(test_array_id)

Deletes the test array identified by test_array_id.

extract_subgraph(create_using, selection, ...)

Extract a subgraph, return a new graph ID

get_edge_IDs_for_vertices(src_vert_IDs, ...)

Return a list of edge IDs corresponding to the vertex IDs in each of src_vert_IDs and dst_vert_IDs that, when combined, define an edge in the graph associated with graph_id.

get_graph_edge_data(id_or_ids, ...)

Returns the edge data as a serialized numpy array for the given id_or_ids.

get_graph_ids()

Returns a list of the graph IDs currently in use.

get_graph_info(keys, graph_id)

Returns a dictionary of meta-data about the graph identified by graph_id.

get_graph_type(graph_id)

Returns a string repr of the graph type associated with graph_id.

get_graph_vertex_data(id_or_ids, ...)

Returns the vertex data as a serialized numpy array for the given id_or_ids.

get_server_info()

Returns a dictionary of meta-data about the server.

initialize_dask_client([protocol, ...])

Initialize a dask client to be used for MG operations.

load_csv_as_edge_data(csv_file_name, ...)

Given a CSV csv_file_name present on the server's file system, read it and apply it as vertex data to the graph specified by graph_id, or the default graph if not specified.

load_csv_as_vertex_data(csv_file_name, ...)

Given a CSV csv_file_name present on the server's file system, read it and apply it as edge data to the graph specified by graph_id, or the default graph if not specified.

load_extensions(extension_dir_or_mod_path)

Loads ("imports") all modules matching the pattern _extension.py in the directory specified by extension_dir_or_mod_path.

load_graph_creation_extensions(...)

Loads ("imports") all modules matching the pattern '_extension.py' in the directory specified by extension_dir_or_mod_path.

receive_test_array(test_array_id)

Returns the test array identified by test_array_id to the client.

receive_test_array_to_device(test_array_id, ...)

Returns the test array identified by test_array_id to the client via UCX-Py listening on result_host/result_port.

shutdown_dask_client()

Shutdown/cleanup the dask client for this handler instance.

unload_extension_module(modname)

Removes all extension functions in modname.

uptime()

Return the server uptime in seconds.

get_graph_edge_property_names

get_graph_edge_types

get_graph_vertex_property_names

get_graph_vertex_types

get_num_edges

get_num_vertices

is_edge_property

is_vertex_property

node2vec

pagerank

renumber_edges_by_type

renumber_vertices_by_type

uniform_neighbor_sample

__init__()[source]#

Methods

__init__()

batched_ego_graphs(seeds, radius, graph_id)

call_extension(func_name, func_args_repr, ...)

Calls the extension function func_name and passes it the eval'd func_args_repr and func_kwargs_repr objects.

call_graph_creation_extension(func_name, ...)

Calls the graph creation extension function func_name and passes it the eval'd func_args_repr and func_kwargs_repr objects.

create_graph()

Create a new graph associated with a new unique graph ID, return the new graph ID.

create_test_array(nbytes)

Creates an array of bytes (int8 values set to 1) and returns an ID to use to reference the array in later test calls.

delete_graph(graph_id)

Remove the graph identified by graph_id from the server.

delete_test_array(test_array_id)

Deletes the test array identified by test_array_id.

extract_subgraph(create_using, selection, ...)

Extract a subgraph, return a new graph ID

get_edge_IDs_for_vertices(src_vert_IDs, ...)

Return a list of edge IDs corresponding to the vertex IDs in each of src_vert_IDs and dst_vert_IDs that, when combined, define an edge in the graph associated with graph_id.

get_graph_edge_data(id_or_ids, ...)

Returns the edge data as a serialized numpy array for the given id_or_ids.

get_graph_edge_property_names(graph_id)

get_graph_edge_types(graph_id)

get_graph_ids()

Returns a list of the graph IDs currently in use.

get_graph_info(keys, graph_id)

Returns a dictionary of meta-data about the graph identified by graph_id.

get_graph_type(graph_id)

Returns a string repr of the graph type associated with graph_id.

get_graph_vertex_data(id_or_ids, ...)

Returns the vertex data as a serialized numpy array for the given id_or_ids.

get_graph_vertex_property_names(graph_id)

get_graph_vertex_types(graph_id)

get_num_edges(edge_type, graph_id)

get_num_vertices(vertex_type, ...)

get_server_info()

Returns a dictionary of meta-data about the server.

initialize_dask_client([protocol, ...])

Initialize a dask client to be used for MG operations.

is_edge_property(property_key, graph_id)

is_vertex_property(property_key, graph_id)

load_csv_as_edge_data(csv_file_name, ...)

Given a CSV csv_file_name present on the server's file system, read it and apply it as vertex data to the graph specified by graph_id, or the default graph if not specified.

load_csv_as_vertex_data(csv_file_name, ...)

Given a CSV csv_file_name present on the server's file system, read it and apply it as edge data to the graph specified by graph_id, or the default graph if not specified.

load_extensions(extension_dir_or_mod_path)

Loads ("imports") all modules matching the pattern _extension.py in the directory specified by extension_dir_or_mod_path.

load_graph_creation_extensions(...)

Loads ("imports") all modules matching the pattern '_extension.py' in the directory specified by extension_dir_or_mod_path.

node2vec(start_vertices, max_depth, graph_id)

pagerank(graph_id)

receive_test_array(test_array_id)

Returns the test array identified by test_array_id to the client.

receive_test_array_to_device(test_array_id, ...)

Returns the test array identified by test_array_id to the client via UCX-Py listening on result_host/result_port.

renumber_edges_by_type(prev_id_column, graph_id)

renumber_vertices_by_type(prev_id_column, ...)

shutdown_dask_client()

Shutdown/cleanup the dask client for this handler instance.

uniform_neighbor_sample(start_list, ...)

unload_extension_module(modname)

Removes all extension functions in modname.

uptime()

Return the server uptime in seconds.

Attributes

is_multi_gpu

True if the CugraphHandler has multiple GPUs available via a dask cluster.

num_gpus

If dask is not available, this returns "1".