Skip to content
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

[V1][Frontend] Add Testing For V1 Runtime Parameters #14159

Merged
merged 10 commits into from
Mar 5, 2025

Conversation

robertgshaw2-redhat
Copy link
Collaborator

@robertgshaw2-redhat robertgshaw2-redhat commented Mar 3, 2025

SUMMARY:

  • add tests for all SamplingParams we can encounter at runtime
  • add ValueError failures if any occur (note: this happens in the per request asyncio task, so just a single request fails when this happens and we handle the error on the client side)
  • add guards for certain features

NOTES:

  • @houseroad - I noticed that the allowed_token_ids sampling is incorrect.
  • @russellb @aarnphm - I did not check for structured output. Can you guys make sure to add this to your PR?

Copy link

github-actions bot commented Mar 3, 2025

👋 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.

🚀

@mergify mergify bot added the v1 label Mar 3, 2025

# Reject all allowed token ids
with pytest.raises(ValueError):
_ = model.generate(PROMPT, SamplingParams(allowed_token_ids=[10]))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean an empty list here? or do you mean a full list?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

once your PR lands, I will revert this

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see the point, you just want to disable this feature completely, and if there is anything, just raise ValueError.

def test_allowed_token_ids(model):
"""Check that we can use allowed_token_ids."""

# This does not currently work due to incorrect implementation.
Copy link
Contributor

Choose a reason for hiding this comment

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

should be fixed by #14169.

@robertgshaw2-redhat robertgshaw2-redhat added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 4, 2025
Copy link
Member

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Great work, these changes look reasonable to me given green tests

Copy link
Contributor

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

The allowed_token_ids part look good to me. Thanks for adding the tests.

raise ValueError("VLLM V1 does not yet support bad_words.")
# Logits processors not supported.
if params.logits_processors:
raise ValueError("VLLM V1 does not yet support per request "
Copy link
Member

Choose a reason for hiding this comment

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

perhaps remove the "yet" from this one?

if priority != 0:
raise ValueError("V1 does not support priority yet.")
if trace_headers is not None:
raise ValueError("V1 does not support tracing yet.")

Copy link
Member

Choose a reason for hiding this comment

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

I think we need this here too?

        if prompt_adapter_request is not None:
            raise ValueError("V1 does not support prompt_adapter_request.")

@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) March 5, 2025 08:29
Copy link

mergify bot commented Mar 5, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @robertgshaw2-redhat.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label Mar 5, 2025
@mergify mergify bot removed the needs-rebase label Mar 5, 2025
@robertgshaw2-redhat robertgshaw2-redhat merged commit 257e200 into main Mar 5, 2025
35 checks passed
@robertgshaw2-redhat robertgshaw2-redhat deleted the v1-runtime-params branch March 5, 2025 14:18
huydhn added a commit to huydhn/vllm that referenced this pull request Mar 5, 2025
The check is introduced by vllm-project#14159
and it will fail v1 benchmark with `VLLM V1 does not yet support
best_of` error as the parameter is not yet supported

Signed-off-by: Huy Do <[email protected]>
njhill added a commit to njhill/vllm that referenced this pull request Mar 5, 2025
This was missed when merging vllm-project#14169 and vllm-project#14159

Signed-off-by: Nick Hill <[email protected]>
johnnynunez pushed a commit to johnnynunez/vllm that referenced this pull request Mar 6, 2025
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 v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants