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

Define a C API for data masking #2630

Merged
merged 4 commits into from
Oct 20, 2022

Conversation

ChuckHastings
Copy link
Collaborator

@ChuckHastings ChuckHastings commented Aug 30, 2022

Add a C API for data masking.

Closes #2571

The objective here is to add a C API that will allow us to associated a data mask with a graph. Basic functions:

  • Create a data mask
  • Destroy a data mask
  • Associated a data mask with a graph
  • Disassociated a data mask from a graph
  • Discover what data mask is associated with a graph

Current plan is to allow for the creation of a mask by the caller (the python layer for our current use case) and have it passed in. We may later add support for other techniques.

This PR can be approved independently, but implementation of the API is dependent on #2679

@ChuckHastings ChuckHastings self-assigned this Aug 30, 2022
@ChuckHastings ChuckHastings added 2 - In Progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 30, 2022
@BradReesWork BradReesWork added this to the 22.10 milestone Sep 29, 2022
@ChuckHastings ChuckHastings marked this pull request as ready for review September 30, 2022 17:15
@ChuckHastings ChuckHastings requested a review from a team as a code owner September 30, 2022 17:15
@ChuckHastings
Copy link
Collaborator Author

rerun tests

@ChuckHastings ChuckHastings modified the milestones: 22.10, 22.12 Oct 3, 2022
@ChuckHastings ChuckHastings changed the base branch from branch-22.10 to branch-22.12 October 3, 2022 15:09
Copy link
Contributor

@naimnv naimnv left a comment

Choose a reason for hiding this comment

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

@ChuckHastings I wonder, how the association between a graph and mask would be kept?
If the caller explicitly maintains that association then it's understood.
Apart from that, the API looks very transparent to me.

@ChuckHastings
Copy link
Collaborator Author

@ChuckHastings I wonder, how the association between a graph and mask would be kept?
If the caller explicitly maintains that association then it's understood.
Apart from that, the API looks very transparent to me.

My intention was to support the C API's graph object to maintain that connection. Sequence of operations would be:

  1. Create a data mask with the call cugraph_data_mask_create
  2. Associate data mask with a graph with the call cugraph_graph_add_data_mask
  3. Caller can now forget the details of the data mask, as it is part of the graph object
  4. If you need to fetch the data mask, the caller can call cugraph_graph_get_data_mask to rediscover that object
  5. cugraph_graph_release_data_mask removes the association of the data mask with the graph
  6. cugraph_data_mask_destroy destroys the data mask. This is required if the mask has been released from the graph, but if the mask is still associated with the graph then when the graph is destroyed this would automatically be called

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.12@856e3ba). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-22.12    #2630   +/-   ##
===============================================
  Coverage                ?   60.44%           
===============================================
  Files                   ?      111           
  Lines                   ?     6515           
  Branches                ?        0           
===============================================
  Hits                    ?     3938           
  Misses                  ?     2577           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@BradReesWork
Copy link
Member

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 74ead42 into rapidsai:branch-22.12 Oct 20, 2022
@ChuckHastings ChuckHastings deleted the data_masking_c_api branch December 2, 2022 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Masking - Define C API
4 participants