Repository navigation
[data][llm] Create data in input dir for the checkpointing doc example - #63526
Conversation
Signed-off-by: Jeffrey Wang <[email protected]>
| engine_kwargs={ | ||
| "max_num_batched_tokens": 4096, | ||
| "max_model_len": 4096, | ||
| }, |
There was a problem hiding this comment.
We previously got away without it because no rows ever reached it.
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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)ray-project#63526) Signed-off-by: Jeffrey Wang <[email protected]> Signed-off-by: phattruong <[email protected]>
ray-project#63526) Signed-off-by: Jeffrey Wang <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>
ray-project#63526) Signed-off-by: Jeffrey Wang <[email protected]> Signed-off-by: 400Ping <[email protected]>
Description
llm-gpuCI test starts failing on master after #63326 -- Ray Data no longer accepts empty input dir.Related issues
Additional information