[CI/Build] Add dtype to LLM creation in v1/sample/test_logprobs.py#29225
Closed
rasmith wants to merge 1 commit intovllm-project:mainfrom
Closed
[CI/Build] Add dtype to LLM creation in v1/sample/test_logprobs.py#29225rasmith wants to merge 1 commit intovllm-project:mainfrom
rasmith wants to merge 1 commit intovllm-project:mainfrom
Conversation
Signed-off-by: Randall Smith <ransmith@amd.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses a numpy error in v1/sample/test_logprobs.py that occurs when the LLM is created without a specified dtype, defaulting to bfloat16 on some hardware. By explicitly setting dtype="half", the tests are now able to pass. The change is correct and well-contained. I approve of this fix.
Member
|
Why didn't this fail in the regular CI? I think using logprobs shouldn't depend on specific dtypes to work. cc @njhill |
Member
|
Can you check if #29216 solves it without having to modify the tests? |
Member
|
Agree with @DarkLight1337 we should fix the code rather than the tests. Should hopefully be fixed by #29216. |
Contributor
Author
|
#29216 indeed fixes the issue! Closing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
dtypeto LLM creation inv1/sample/test_logprobs.pysince the model will usebfloat16if the dtype is not specified which leads to anumpyerror, wherenumpydoes not supportbfloat16for lists.Adding the
dtypeallows all the tests to pass.The test now returns:
23 passed, 7 skipped, 4 warnings