Skip to content

[Data] read_webdataset emits one DataFrame per sample, causing per-sample size_bytes overhead in the output buffer - #65392

Closed
Hyunoh-Yeo wants to merge 40 commits into
ray-project:masterfrom
Hyunoh-Yeo:in-progress-65350
Closed

Hyunoh-Yeo wants to merge 40 commits into
ray-project:masterfrom
Hyunoh-Yeo:in-progress-65350

Conversation

@Hyunoh-Yeo

Copy link
Copy Markdown
Contributor

Description

WebDatasetDatasource._read_stream emits one single-row DataFrame per sample, which means the output buffer runs PandasBlockAccessor.size_bytes once per sample. On large shards this dominates read-side CPU (~63% of the ReadWebDataset operator's CPU). This changes the behavior of readwebdataset and let it accumulates 512 samples per emitted DataFrame.

Related issues

Closes #65350

Additional information

Benchmark specs are specified in #65350

  • It was cross-validated with a reporter

Added a parametrized test (test_read_webdataset_chunked_samples) that verifies the output is identical to the original per-sample behavior (row count, values, and order)

  • test with different sample sizes (1 / 511 / 512 / 513 / 1000 samples).

Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
Signed-off-by: Hyunoh-Yeo <[email protected]>
@Hyunoh-Yeo Hyunoh-Yeo closed this Aug 11, 2026
@Hyunoh-Yeo
Hyunoh-Yeo deleted the in-progress-65350 branch August 11, 2026 20:30
@Hyunoh-Yeo

Copy link
Copy Markdown
Contributor Author

Active PR is here : #65394

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 this pull request may close these issues.

[Data] read_webdataset emits one DataFrame per sample, causing per-sample size_bytes overhead in the output buffer

1 participant