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

[FEA] API for PropetyGraphs for get_edge_data and get_vertex_data #2421

Closed
VibhuJawa opened this issue Jul 19, 2022 · 0 comments · Fixed by #2444
Closed

[FEA] API for PropetyGraphs for get_edge_data and get_vertex_data #2421

VibhuJawa opened this issue Jul 19, 2022 · 0 comments · Fixed by #2444
Assignees
Milestone

Comments

@VibhuJawa
Copy link
Member

Describe the solution you'd like and any additional context

We should create an API for PropetyGraphs to get_edge_data and get_vertex_data

Requested API :

def get_edge_data(edge_ids, columns, etype):
     Parameters:
              edge_ids (cudf.Series) 
              columns (list[string])  (Can include `SRC` and `DST` columns)
              etype: String 
    Returns:
             df (cudf.DataFrame): Dataframe corresponding to the `edge_ids` with the corresponding  `columns` 
def get_vertex_data(vertex_ids, columns, vtype):
      Parameters:
              vertex_ids (cudf.Series) 
              col_names (list[string]) 
              vtype: String 
     
     Returns:
             df (cudf.DataFrame): Dataframe corresponding to the `vertex_ids` with the corresponding `columns` 
@rlratzel rlratzel self-assigned this Jul 20, 2022
@rlratzel rlratzel added this to the 22.08 milestone Jul 20, 2022
rapids-bot bot pushed a commit that referenced this issue Jul 29, 2022
#2444)

closes #2421 

Added `get_vertex_data()` and `get_edge_data()` to SG and MG PropertyGraph, and corresponding tests.

Prior to these methods, users had to either call `pG.annotate_dataframe()` to get properties for edges or access the internal debug dataframes directly via `pG._vertex_prop_dataframe` and `pG._edge_prop_dataframe`.

Users can now call `pG.get_vertex_data(vertex_ids, types, columns)` to get vertex properties for the vertices specified by `vertex_ids`, and 'types', with data for each column specified. All args are optional and default to "all" for each category.  `pG.get_edge_data(edge_ids, types, columns)` works the same for edges.  The return value for both is a dataframe.

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

Approvers:
  - Vibhu Jawa (https://github.com/VibhuJawa)
  - Alex Barghi (https://github.com/alexbarghi-nv)
  - Erik Welch (https://github.com/eriknw)
  - Brad Rees (https://github.com/BradReesWork)

URL: #2444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants