-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extract the edgelist from the graph #4750
base: branch-24.12
Are you sure you want to change the base?
extract the edgelist from the graph #4750
Conversation
@@ -979,6 +980,83 @@ def convert_to_cudf(cp_arrays): | |||
|
|||
return ddf | |||
|
|||
def decompress_to_edgelist( | |||
self, | |||
original: bool = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be more descriptive if it was named return_unrenumbered_edgelist
|
||
Returns | ||
------- | ||
ego_edge_lists : dask_cudf.DataFrame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the right name for the return value? Also, should it be plural? I figured it would be just edgelist
>>> (sources, destinations, edge_weights, _, _) = | ||
... pylibcugraph.induced_subgraph( | ||
... resource_handle, G, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be calling decompress_to_edgelist
somewhere?
python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py
Show resolved
Hide resolved
…2_expose-decompress-to-edgelist
cugraph_error_code_t cugraph_decompress_to_edgelist(const cugraph_resource_handle_t* handle, | ||
cugraph_graph_t* graph, | ||
bool_t do_expensive_check, | ||
cugraph_induced_subgraph_result_t** result, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a suggestion, but cugraph_induced_subgraph_result_t
sounds a bit of misnomer here. We may used this data structure to just store edge list from the induced subgraph algorithm in the past, but if we wish to use this for other algorithms as well, we may better rename this now or sometime in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I would suggest cugraph_edgelist_t
. I have a draft PR (that I need to discard and start over with) that was going to create a cugraph_edgelist_t
for the C API for graph construction.
I'd suggest the following:
- Replicate the
cugraph_induced_subgraph_result_t
type and C API accessor functions to call itcugraph_edgelist_t
instead - Mark the induced subgraph variations as deprecated
- Within the C API implementation (
src/c_api
) you can either rename thecugraph::c_api::cugraph_induced_subgraph_result_t
tocugraph::c_api::cugraph_edgelist_t
and rename all references accordingly, or you can leave it using the legacy version and I'll fix it in 25.02 when I finish the C API graph construction updates.
transpose_storage<vertex_t, edge_t, weight_t, store_transposed, multi_gpu>( | ||
handle_, graph_, error_.get()); | ||
if (error_code_ != CUGRAPH_SUCCESS) | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
This PR exposes the C++ function decompress_to_edgelist to the C, PLC and Python API. This will enable the extraction of the edgelist from a graph which is currently not supported. It also removes the deprecated parameter
legacy_renum_only