Skip to content

[data][llm] Create data in input dir for the checkpointing doc example - #63526

Merged
kouroshHakha merged 1 commit into
masterfrom
data-llm-checkpoint-fix
May 20, 2026
Merged

kouroshHakha merged 1 commit into
masterfrom
data-llm-checkpoint-fix

Conversation

@jeffreywang88

Copy link
Copy Markdown
Contributor

Description

llm-gpu CI test starts failing on master after #63326 -- Ray Data no longer accepts empty input dir.

Related issues

Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

@jeffreywang88
jeffreywang88 requested a review from a team as a code owner May 19, 2026 22:16
Comment on lines +169 to +172
engine_kwargs={
"max_num_batched_tokens": 4096,
"max_model_len": 4096,
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We previously got away without it because no rows ever reached it.

@jeffreywang88 jeffreywang88 added the go add ONLY when ready to merge, run all tests label May 19, 2026

@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 updates the basic LLM example by seeding the input directory to prevent errors with empty directories in Ray Data V2, configuring engine parameters for the vLLM processor, and updating the preprocessing logic to use a message-based format. Feedback suggests extracting the magic number used for the number of input rows into a named constant to improve readability and maintainability.


# Seed the input directory because Ray Data V2's `read_parquet` errors on empty dirs
ray.data.from_items(
[{"id": i, "message": f"Question {i}: What is 2 + 2?"} for i in range(4)]

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.

medium

For improved readability and maintainability, consider extracting the magic number 4 into a named constant. This makes the purpose of the number explicit and simplifies future modifications.

For example:

NUM_INPUT_ROWS = 4
# ...
ray.data.from_items(
    [{"id": i, "message": f"Question {i}: What is 2 + 2?"} for i in range(NUM_INPUT_ROWS)]
).write_parquet(input_path)

@kouroshHakha
kouroshHakha enabled auto-merge (squash) May 20, 2026 01:03
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation data Ray Data-related issues llm labels May 20, 2026
@kouroshHakha
kouroshHakha merged commit 856f7b4 into master May 20, 2026
7 checks passed
@kouroshHakha
kouroshHakha deleted the data-llm-checkpoint-fix branch May 20, 2026 03:22
TruongQuangPhat pushed a commit to cyhapun/ray-fix-issue that referenced this pull request May 27, 2026
alexandrplashchinsky pushed a commit to alexandrplashchinsky/ray-alex that referenced this pull request May 29, 2026
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues docs An issue or change related to documentation go add ONLY when ready to merge, run all tests llm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ray fails to serialize self-reference objects

2 participants