Skip to content

[Data] Expose read-task resource args in read_webdataset - #65623

Merged
richardliaw merged 4 commits into
ray-project:masterfrom
Hyunoh-Yeo:in-progress-65350-2
Aug 21, 2026
Merged

richardliaw merged 4 commits into
ray-project:masterfrom
Hyunoh-Yeo:in-progress-65350-2

Conversation

@Hyunoh-Yeo

Copy link
Copy Markdown
Contributor

Description

read_webdataset does not allow num_cpus, num_gpus, memory, or ray_remote_args, so users must drop to read_datasource and build WebDatasetDatasource directly to tune read task resources, while readers of other formats already expose these. This allows users to pass these arguments to read_webdataset for consistency and user convenience, which matters when the read is I/O bound. In this case, lowering num_cpus runs more concurrent read tasks for higher S3 throughput.

Related issues

Related to #65394

@Hyunoh-Yeo
Hyunoh-Yeo requested a review from a team as a code owner August 20, 2026 19:36

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds resource configuration parameters (num_cpus, num_gpus, memory, and ray_remote_args) to the read_webdataset function, allowing users to customize resource reservations for parallel read workers. These arguments are properly documented, forwarded to read_datasource, and verified with a new unit test. The feedback suggests a minor improvement to correct the type annotation of ray_remote_args to Optional[Dict[str, Any]] to match its default value of None.

Comment thread python/ray/data/read_api.py Resolved
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Hyunoh Yeo <[email protected]>
@richardliaw richardliaw added the go add ONLY when ready to merge, run all tests label Aug 20, 2026
@ray-gardener ray-gardener Bot added data Ray Data-related issues community-contribution Contributed by the community labels Aug 21, 2026
@richardliaw
richardliaw merged commit 478f431 into ray-project:master Aug 21, 2026
6 checks passed
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…#65623)

## Description
`read_webdataset` does not allow num_cpus, num_gpus, memory, or
ray_remote_args, so users must drop to `read_datasource` and build
`WebDatasetDatasource` directly to tune read task resources, while
readers of other formats already expose these. This allows users to pass
these arguments to `read_webdataset` for consistency and user
convenience, which matters when the read is I/O bound. In this case,
lowering num_cpus runs more concurrent read tasks for higher S3
throughput.

## Related issues
Related to ray-project#65394

---------

Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh Yeo <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants