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]: Add getters to Datasets API to easily get metadata information #3820

Closed
2 tasks done
nv-rliu opened this issue Aug 23, 2023 · 0 comments · Fixed by #3821
Closed
2 tasks done

[FEA]: Add getters to Datasets API to easily get metadata information #3820

nv-rliu opened this issue Aug 23, 2023 · 0 comments · Fixed by #3821
Assignees
Labels
feature request New feature or request improvement Improvement / enhancement to an existing function
Milestone

Comments

@nv-rliu
Copy link
Contributor

nv-rliu commented Aug 23, 2023

Is this a new feature, an improvement, or a change to existing functionality?

Improvement

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem this feature solves

If a cugraph user wants to view metadata (eg number of nodes) in a dataset, they have to either navigate to the metadata path to view the YAML files or access it through dataset.metadata.

Describe your ideal solution

To simplify the process for the end-user, Datasets objects can have getter methods that quickly read from the metadata.

# old
dataset.metadata['is_directed']
# new
dataset.is_directed()

Describe any alternatives you have considered

n/a

Additional context

n/a

Code of Conduct

  • I agree to follow cuGraph's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
@nv-rliu nv-rliu added feature request New feature or request improvement Improvement / enhancement to an existing function labels Aug 23, 2023
@nv-rliu nv-rliu self-assigned this Aug 23, 2023
@nv-rliu nv-rliu added this to the 23.10 milestone Aug 23, 2023
@rapids-bot rapids-bot bot closed this as completed in #3821 Sep 8, 2023
rapids-bot bot pushed a commit that referenced this issue Sep 8, 2023
Closes #3820 

This PR adds simple getter methods to the `dataset` class, which allows users to easily get information about datasets without need to access the `metadata` dict or look in the directory.

```python
from cugraph.datasets import karate

# users now call
karate.number_of_nodes()

# instead of 
karate.metadata['number_of_nodes']
```

Authors:
  - ralph (https://github.com/nv-rliu)

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

URL: #3821
rlratzel pushed a commit to rlratzel/cugraph that referenced this issue Sep 8, 2023
Closes rapidsai#3820

This PR adds simple getter methods to the `dataset` class, which allows users to easily get information about datasets without need to access the `metadata` dict or look in the directory.

```python
from cugraph.datasets import karate

# users now call
karate.number_of_nodes()

# instead of
karate.metadata['number_of_nodes']
```

Authors:
  - ralph (https://github.com/nv-rliu)

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

URL: rapidsai#3821
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request improvement Improvement / enhancement to an existing function
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant