Python API updates to enable explicit control of internal graph_t creation and deletion#2023
Conversation
…t probably is not necessary given the dir name, updated @experimental decorator to not error on extension types (from cython), removed unnecessary gpu_graph_data class and replaced with cython SGGraph class.
…e callable, removed __init__.py file contents from connectivity in favor of just exposing functions in the top-level __init__.py.
…d an experimental/__init__.py file.
…y copies), added additional types for C API structs, added tests.
…2-initialexpertmode
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #2023 +/- ##
================================================
+ Coverage 71.93% 72.87% +0.93%
================================================
Files 146 150 +4
Lines 9264 9669 +405
================================================
+ Hits 6664 7046 +382
- Misses 2600 2623 +23
Continue to review full report at Codecov.
|
… of cugraph_c with a leading underscore, moved test fixtures to conftest.py.
…2-initialexpertmode
…sociated expected outputs, more updates to pagerank function and test.
…2-initialexpertmode
…e set correctly, fixed flake8 error.
…to branch-22.02-initialexpertmode
ChuckHastings
left a comment
There was a problem hiding this comment.
A few minor observations. I think it's fine to go forward, but we probably should address these early in 22.04
| c_api::cugraph_type_erased_device_array_view_t const* weights, | ||
| bool_t renumber, | ||
| bool_t check, | ||
| data_type_id_t edge_type) |
There was a problem hiding this comment.
So, if we have 'edge_type', shouldn't there be 'vertex_type' as well?
There was a problem hiding this comment.
Vertex_type is embedded in the type erased array. Edge type cannot be deduced from the other parameters.
seunghwak
left a comment
There was a problem hiding this comment.
Approving (assuming FIXMEs will be addressed quickly in the next release).
|
@gpucibot merge |
…reation and deletion (rapidsai#2023) Python API updates to enable explicit control of internal `graph_t` creation and deletion. These changes will allow users who need more control over how the internal `graph_t` object is managed to have additional APIs to do so. Current cugraph algos construct the appropriate `graph_t` at the C++ boundary, run the algo, and destroy the object each time. This is more convenient and safer in some cases since it does not require the user to understand the necessary data format requirements for each algo (CSC, CSR, etc.), but it adds overhead to each algo call. If a user knows which algos will be called ahead of time and the relevant graph creation options to use, they can reuse the underlying `graph_t` object and eliminate the redundant creation/deletion expense. These APIs also allow for benchmarks to measure only the algo run time without the initial graph creation time. These changes are grouped into a category of enhancements sometimes referred to as "expert mode" Changes here include: * Updates to `pylibcugraph` to add the APIs from the `libcugraph_c` library for `graph_t` management and calling Pagerank and SSSP * Addition of the `experimental` namespace to `pylibcugraph`, which is where some of the new APIs will be until we finalize decisions on names, signatures, etc. * <s>Updates to cugraph Graph classes, Pagerank, and SSSP algos to call in to `pylibcugraph`</s> Authors: - Rick Ratzel (https://github.com/rlratzel) - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) - Brad Rees (https://github.com/BradReesWork) URL: rapidsai#2023
…reation and deletion (rapidsai#2023) Python API updates to enable explicit control of internal `graph_t` creation and deletion. These changes will allow users who need more control over how the internal `graph_t` object is managed to have additional APIs to do so. Current cugraph algos construct the appropriate `graph_t` at the C++ boundary, run the algo, and destroy the object each time. This is more convenient and safer in some cases since it does not require the user to understand the necessary data format requirements for each algo (CSC, CSR, etc.), but it adds overhead to each algo call. If a user knows which algos will be called ahead of time and the relevant graph creation options to use, they can reuse the underlying `graph_t` object and eliminate the redundant creation/deletion expense. These APIs also allow for benchmarks to measure only the algo run time without the initial graph creation time. These changes are grouped into a category of enhancements sometimes referred to as "expert mode" Changes here include: * Updates to `pylibcugraph` to add the APIs from the `libcugraph_c` library for `graph_t` management and calling Pagerank and SSSP * Addition of the `experimental` namespace to `pylibcugraph`, which is where some of the new APIs will be until we finalize decisions on names, signatures, etc. * <s>Updates to cugraph Graph classes, Pagerank, and SSSP algos to call in to `pylibcugraph`</s> Authors: - Rick Ratzel (https://github.com/rlratzel) - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) - Brad Rees (https://github.com/BradReesWork) URL: rapidsai#2023
…reation and deletion (rapidsai#2023) Python API updates to enable explicit control of internal `graph_t` creation and deletion. These changes will allow users who need more control over how the internal `graph_t` object is managed to have additional APIs to do so. Current cugraph algos construct the appropriate `graph_t` at the C++ boundary, run the algo, and destroy the object each time. This is more convenient and safer in some cases since it does not require the user to understand the necessary data format requirements for each algo (CSC, CSR, etc.), but it adds overhead to each algo call. If a user knows which algos will be called ahead of time and the relevant graph creation options to use, they can reuse the underlying `graph_t` object and eliminate the redundant creation/deletion expense. These APIs also allow for benchmarks to measure only the algo run time without the initial graph creation time. These changes are grouped into a category of enhancements sometimes referred to as "expert mode" Changes here include: * Updates to `pylibcugraph` to add the APIs from the `libcugraph_c` library for `graph_t` management and calling Pagerank and SSSP * Addition of the `experimental` namespace to `pylibcugraph`, which is where some of the new APIs will be until we finalize decisions on names, signatures, etc. * <s>Updates to cugraph Graph classes, Pagerank, and SSSP algos to call in to `pylibcugraph`</s> Authors: - Rick Ratzel (https://github.com/rlratzel) - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) - Brad Rees (https://github.com/BradReesWork) URL: rapidsai#2023
…reation and deletion (rapidsai#2023) Python API updates to enable explicit control of internal `graph_t` creation and deletion. These changes will allow users who need more control over how the internal `graph_t` object is managed to have additional APIs to do so. Current cugraph algos construct the appropriate `graph_t` at the C++ boundary, run the algo, and destroy the object each time. This is more convenient and safer in some cases since it does not require the user to understand the necessary data format requirements for each algo (CSC, CSR, etc.), but it adds overhead to each algo call. If a user knows which algos will be called ahead of time and the relevant graph creation options to use, they can reuse the underlying `graph_t` object and eliminate the redundant creation/deletion expense. These APIs also allow for benchmarks to measure only the algo run time without the initial graph creation time. These changes are grouped into a category of enhancements sometimes referred to as "expert mode" Changes here include: * Updates to `pylibcugraph` to add the APIs from the `libcugraph_c` library for `graph_t` management and calling Pagerank and SSSP * Addition of the `experimental` namespace to `pylibcugraph`, which is where some of the new APIs will be until we finalize decisions on names, signatures, etc. * <s>Updates to cugraph Graph classes, Pagerank, and SSSP algos to call in to `pylibcugraph`</s> Authors: - Rick Ratzel (https://github.com/rlratzel) - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) Approvers: - Chuck Hastings (https://github.com/ChuckHastings) - Seunghwa Kang (https://github.com/seunghwak) - Brad Rees (https://github.com/BradReesWork) URL: rapidsai#2023
Python API updates to enable explicit control of internal
graph_tcreation and deletion. These changes will allow users who need more control over how the internalgraph_tobject is managed to have additional APIs to do so. Current cugraph algos construct the appropriategraph_tat the C++ boundary, run the algo, and destroy the object each time. This is more convenient and safer in some cases since it does not require the user to understand the necessary data format requirements for each algo (CSC, CSR, etc.), but it adds overhead to each algo call. If a user knows which algos will be called ahead of time and the relevant graph creation options to use, they can reuse the underlyinggraph_tobject and eliminate the redundant creation/deletion expense. These APIs also allow for benchmarks to measure only the algo run time without the initial graph creation time.These changes are grouped into a category of enhancements sometimes referred to as "expert mode"
Changes here include:
pylibcugraphto add the APIs from thelibcugraph_clibrary forgraph_tmanagement and calling Pagerank and SSSPexperimentalnamespace topylibcugraph, which is where some of the new APIs will be until we finalize decisions on names, signatures, etc.Updates to cugraph Graph classes, Pagerank, and SSSP algos to call in topylibcugraph