rapidsai / cugraph

cuGraph - RAPIDS Graph Analytics Library
https://docs.rapids.ai/api/cugraph/stable/
Apache License 2.0
1.76k stars 304 forks source link

[FEA]: Add functionality to retrieve types from the graph #4714

Open jnke2016 opened 1 month ago

jnke2016 commented 1 month ago

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem this feature solves

Our C/C++ API requires type matching. For instance in PageRank, It requires the graph's vertex type and initial guess vertex type to match . Failing to enforce that will lead to a type mismatch error hence, the python API leverages a python function ensure_valid_dtype to enforce the type if the user fails to and return a warning. However, the type is extracted from the internal edge which is odd since we have a C method that can retrieve the graph's type include the vertex_t, edge_t and weight_t. Furthermore, we also have a method in the CAPI that can return the type from a device array view cugraph_type_erased_device_array_view_type which can also be leveraged.

Describe your ideal solution

Add/expose method to retrieve types from the graph

Describe any alternatives you have considered

No response

Additional context

No response

Code of Conduct