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

Revise get_reader_filepath_or_buffer to handle a list of data sources #16613

Merged

Conversation

rjzamora
Copy link
Member

@rjzamora rjzamora commented Aug 20, 2024

Description

The cudf read APIs (e.g. cudf.read_parquet, cudf.read_json, etc...) currently iterate over data sources, calling get_reader_filepath_or_buffer on each source independently when multiple files are mapped to the same cudf.DataFrame. This is suboptimal when the data sources are remote-file paths (e.g. in S3). In this case, we should be initiating network transfers for all files in parallel (and as early as possible).

This PR makes it easier to optimize multi-file data transfer in follow-up work. It also simplifies and centralizes some of the common logic used by the various read APIs.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@rjzamora rjzamora added 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 20, 2024
@rjzamora rjzamora self-assigned this Aug 20, 2024
@github-actions github-actions bot added the Python Affects Python cuDF API. label Aug 20, 2024
@rjzamora rjzamora marked this pull request as ready for review August 21, 2024 14:22
@rjzamora rjzamora requested a review from a team as a code owner August 21, 2024 14:22
@rjzamora rjzamora added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Aug 21, 2024
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Mostly looks great, just wonder if we need to unlist in the non-list input case.

python/cudf/cudf/utils/ioutils.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Show resolved Hide resolved
python/cudf/cudf/io/json.py Outdated Show resolved Hide resolved
python/cudf/cudf/io/parquet.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Outdated Show resolved Hide resolved
python/cudf/cudf/utils/ioutils.py Show resolved Hide resolved
python/cudf/cudf/io/json.py Outdated Show resolved Hide resolved
python/cudf/cudf/io/text.py Outdated Show resolved Hide resolved
@rjzamora rjzamora added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Aug 26, 2024
@rjzamora
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit a250391 into rapidsai:branch-24.10 Aug 26, 2024
84 checks passed
@rjzamora rjzamora deleted the revise-get_reader_filepath_or_buffer branch August 26, 2024 16:42
rapids-bot bot pushed a commit that referenced this pull request Sep 4, 2024
Follow up to #16613
Supersedes #16166

Improves remote-IO read performance when multiple files are read at once. Also enables partial IO for remote Parquet files (previously removed in `24.10` by #16589).

Authors:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Lawrence Mitchell (https://github.com/wence-)

URL: #16657
res-life pushed a commit to res-life/cudf that referenced this pull request Sep 11, 2024
…i#16657)

Follow up to rapidsai#16613
Supersedes rapidsai#16166

Improves remote-IO read performance when multiple files are read at once. Also enables partial IO for remote Parquet files (previously removed in `24.10` by rapidsai#16589).

Authors:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Lawrence Mitchell (https://github.com/wence-)

URL: rapidsai#16657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants