Skip to content

[Misc][Benchmark] Add support for CustomDataset #18511

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

Merged
merged 15 commits into from
May 31, 2025

Conversation

ekagra-ranjan
Copy link
Contributor

@ekagra-ranjan ekagra-ranjan commented May 21, 2025

Fixes: #14036 (review) and #18509

Currently, online serving benchmark only loads some specified dataset. This PR adds support for CustomDataset which can load arbitrary datasets for benchmarking. It accepts dataset in jsonl format and can be extended to other format since it converts the input data to into a standardized format of list of dictionary in load_data() which then is used in sample().
Example is given in the comment of the function.

Usage

MODEL_NAME=meta-llama/Llama-3.1-8B-Instruct
ONLINE_CUSTOM_DATASET="data.jsonl"

time python3 benchmarks/benchmark_serving.py --port 9001 --save-result --save-detailed \
  --backend vllm \
  --model "${MODEL_NAME}" \
  --endpoint /v1/completions \
  --dataset-name custom \
  --dataset-path ${ONLINE_CUSTOM_DATASET} \
  --custom-skip-chat-template \
  --num-prompts 80 \
  --max-concurrency 1 \
  --temperature=0.3 \
  --top-p=0.75 \
  --result-dir "./log/"

example of data.jsonl

{"prompt": "What is the capital of India?"}
{"prompt": "What is the capital of Iran?"}
{"prompt": "What is the capital of China?"}

cc: @ywang96

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@simon-mo simon-mo requested a review from ywang96 May 27, 2025 19:03
Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

Overall LGTM and I left a comment! Can you also update the benchmark readme to include this dataset? Thanks!

@ekagra-ranjan ekagra-ranjan requested a review from ywang96 May 28, 2025 20:08
@ekagra-ranjan
Copy link
Contributor Author

@ywang96 - all done! Pls have another look.

Copy link
Member

@ywang96 ywang96 left a comment

Choose a reason for hiding this comment

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

🚢 @ekagra-ranjan Thank you for the contribution!

@ywang96 ywang96 added the ready ONLY add when PR is ready to merge/full CI is needed label May 28, 2025
@ywang96 ywang96 enabled auto-merge (squash) May 28, 2025 20:19
@ekagra-ranjan
Copy link
Contributor Author

ekagra-ranjan commented May 28, 2025

There is 1 failure in V1 test which is blocking merge


=========================== short test summary info ============================
--
  | [2025-05-28T21:23:02Z] FAILED v1/engine/test_async_llm.py::test_abort[engine_args0-Hello my name is Robert and-RequestOutputKind.DELTA] - assert not True
  | [2025-05-28T21:23:02Z]  +  where True = has_unfinished_requests()
  | [2025-05-28T21:23:02Z]  +    where has_unfinished_requests = <vllm.v1.engine.output_processor.OutputProcessor object at 0x7ff42ed8d4f0>.has_unfinished_requests
  | [2025-05-28T21:23:02Z]  +      where <vllm.v1.engine.output_processor.OutputProcessor object at 0x7ff42ed8d4f0> = <vllm.v1.engine.async_llm.AsyncLLM object at 0x7ff433c1ce60>.output_processor
  | [2025-05-28T21:23:02Z] ============ 1 failed, 50 passed, 21 warnings in 760.68s (0:12:40) =============
  | [2025-05-28T21:23:05Z] 🚨 Error: The command exited with status 1

I dont think its caused by this PR. Could be related to this. @ywang96 - what are your thoughts?

@ekagra-ranjan ekagra-ranjan requested a review from ywang96 May 29, 2025 15:36
@ywang96
Copy link
Member

ywang96 commented May 30, 2025

@ekagra-ranjan I've merged this branch from main so let's see if it helps!

@ywang96 ywang96 merged commit bbfa0c6 into vllm-project:main May 31, 2025
62 of 63 checks passed
amitm02 pushed a commit to amitm02/vllm that referenced this pull request Jun 1, 2025
amitm02 pushed a commit to amitm02/vllm that referenced this pull request Jun 1, 2025
minpeter pushed a commit to minpeter/vllm that referenced this pull request Jun 24, 2025
Signed-off-by: minpeter <kali2005611@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants