Skip to content
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

Adds arbitrary server extension support to cugraph-service #2850

Conversation

rlratzel
Copy link
Contributor

@rlratzel rlratzel commented Oct 26, 2022

closes #2822

This PR adds the ability for users to add extensions that accept and return arbitrary values that run server-side, in addition to the graph creation extensions already supported.

  • Adds the new load_extensions(), and call_extension() APIs
  • Replaces unload_graph_creation_extensions() with the more general unload_extension_module()
  • Adds additional tests for the new extension types
  • Added the ability to load extensions using a python-style module path, useful for loading server-side extensions that are importable but the path on disk is not known
  • Added tests for extensions that access the server facade object, to serve as examples for extension writers
  • Also added result_device_id option to new call_extension(), and benchmark
  • Also updates dask init call to use defaults and removes problematic hardcoded transports

image
device=None is a host RPC data transfer, device=0 is a GPU-GPU data transfer from the server on device 1 to the client on device 0

TODO:

  • Update new call_extension() API to allow caller to specify a device to directly transfer results to
  • Add test/example of an extension that accesses a server-side graph

…to graph creation extensions, changed how unloading extensions work to unload by unique module name, make numpy and cupy optional modules in the client, updated Value and ValueWrapper to handle doubles and lists (recursive), added tests for new extension changes.
@rlratzel rlratzel added improvement Improvement / enhancement to an existing function breaking Breaking change labels Oct 26, 2022
@rlratzel rlratzel added this to the 22.12 milestone Oct 26, 2022
@rlratzel rlratzel requested a review from VibhuJawa October 26, 2022 05:19
@rlratzel rlratzel self-assigned this Oct 26, 2022
…one, added test for extension modules returning results to client GPUs (code not done yet).
…(), updated tests, added test for upcoming ability to load extensions via import paths.
…kage path (eg. import foo.bar.baz), updated test.
…ns, added tests for error conditions, added benchmark for call_extension test.
@rlratzel rlratzel marked this pull request as ready for review October 27, 2022 06:28
@rlratzel rlratzel requested a review from a team as a code owner October 27, 2022 06:28
@rlratzel
Copy link
Contributor Author

rerun tests

reason: gpuCI issue related to conda channel priority in the build image, which may have been resolved by now.

@alexbarghi-nv
Copy link
Member

alexbarghi-nv commented Oct 27, 2022

Is this the preferred way of calling cuGraph algorithms, i.e. uniform_neighbor_sample, and if so, do we want to pre-load cuGraph algorithm extensions by default, or go through another route?

Basically I'm looking ahead to what #2832 is trying to do, and see if I can use this extension support mechanism to dispatch any cuGraph algorithm.

@rlratzel
Copy link
Contributor Author

Is this the preferred way of calling cuGraph algorithms, i.e. uniform_neighbor_sample, and if so, do we want to pre-load cuGraph algorithm extensions by default, or go through another route?

I don't think this is the preferred way, but instead a way for clients to just add custom functionality that runs on the server (plugins). I suppose we can use this to easily prototype new functionality too (eg. @VibhuJawa will be using it to add APIs to support heterogeneous graphs more efficiently in the short-term), but for now I'm thinking we'd still want clients to call client.uniform_neighbor_sample, etc. for the "standard" APIs.

Basically I'm looking ahead to what #2832 is trying to do, and see if I can use this extension support mechanism to dispatch any cuGraph algorithm.

You do bring up a good point, and the server could eventually be nothing more than a mechanism to call server-side functions from files on disk which could just make up the entire client API, and the client API could just be hidden behind the Remote classes and algo dispatcher.

@alexbarghi-nv
Copy link
Member

Ok, this looks good then, I just want to have one more look-over before I give the final thumbs up.

@VibhuJawa VibhuJawa mentioned this pull request Oct 28, 2022
18 tasks
Copy link
Member

@alexbarghi-nv alexbarghi-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

…register graphs, added support for returning int8 so graph IDs can be returned easier.
@BradReesWork
Copy link
Member

rerun tests

Copy link
Member

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me

@BradReesWork
Copy link
Member

rerun tests

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 9be46fd into rapidsai:branch-22.12 Nov 3, 2022
rapids-bot bot pushed a commit that referenced this pull request Nov 4, 2022
To enable using the same functions on both remote graph and local graph (See PR: #2850) I have reformatted the class to remove dependency from  PropertyGraph, cugraph, cudf, dask_cudf 

CC: @rlratzel , @alexbarghi-nv

Authors:
  - Vibhu Jawa (https://github.com/VibhuJawa)

Approvers:
  - Rick Ratzel (https://github.com/rlratzel)

URL: #2855
rapids-bot bot pushed a commit that referenced this pull request Nov 9, 2022
Add remote CuGraphRemoteStore support to enable using of graph service with DGL . 

- [x] Transfer via UCX to device
- [x] Add node_parquet_data
- [x] Add edge_parquet_data
- [x] node_storage
- [x] edge_storage 
- [x] node attributes
- [x] edge attributes
- [x] extract_subgraph
- [x] uniform sampling

Tests:
- [ ] How to run tests in CI !!!
- [x] add_node_parquet_data
- [x] add_edge_parquet_data
- [x] node_storage
- [x] edge_storage 
- [x] node attributes
- [x] edge attributes
- [x] extract_subgraph
- [x] uniform sampling

This PR depends upon:
#2855
#2850

Authors:
  - Vibhu Jawa (https://github.com/VibhuJawa)
  - Rick Ratzel (https://github.com/rlratzel)

Approvers:
  - Alex Barghi (https://github.com/alexbarghi-nv)
  - Rick Ratzel (https://github.com/rlratzel)

URL: #2859
@rlratzel rlratzel deleted the branch-22.12-cugraph_service_extension_enhancements branch September 28, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change improvement Improvement / enhancement to an existing function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow cugraph_service extensions to support more than graph creation
4 participants