-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Bugfix] Parse SpeculativeConfig Error #25142
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
[Bugfix] Parse SpeculativeConfig Error #25142
Conversation
2b5ca2a
to
a98c9aa
Compare
There was a problem hiding this comment.
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 addresses an error in parsing SpeculativeConfig
by refactoring how the --speculative-config
command-line argument is handled. The changes correctly fix the immediate parsing issue. However, I've identified a critical flaw in the new type check within _is_v1_supported_oracle
. The current fix is incomplete as it only validates the configuration when it's a dictionary, but overlooks the case where it's a SpeculativeConfig
object. This could lead to incorrect behavior and subsequent runtime failures. I have provided a detailed comment with a suggested code change to make the validation more robust.
fa070f8
to
ac91b85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @hmellor
@hmellor PTAL, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already parsed as a dict in
Lines 914 to 919 in 273690a
# We construct SpeculativeConfig using fields from other configs in | |
# create_engine_config. So we set the type to a JSON string here to | |
# delay the Pydantic validation that comes with SpeculativeConfig. | |
vllm_kwargs["speculative_config"]["type"] = optional_type(json.loads) | |
vllm_group.add_argument("--speculative-config", | |
**vllm_kwargs["speculative_config"]) |
Only the second change is necessary
Signed-off-by: zxw <1020938856@qq.com>
ac91b85
to
a7983f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
c456609
to
9b510f5
Compare
(sorry I messed up DCO on my commit so I force-pushed to replace just my commit with a signed-off one) |
Signed-off-by: zxw <1020938856@qq.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: zxw <1020938856@qq.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
Purpose
fix #24888
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.