-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Support non-string values in JSON keys from CLI #19471
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
Support non-string values in JSON keys from CLI #19471
Conversation
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
👋 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 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 🚀 |
@@ -13,32 +13,32 @@ | |||
from vllm.platforms import current_platform | |||
|
|||
|
|||
class TestConfig1: | |||
class _TestConfig1: |
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.
I added underscore to the names to silence the pytest warnings, since normally classes beginning with Test
are supposed to be test suites.
@@ -1466,7 +1466,7 @@ def repl(match: re.Match) -> str: | |||
pattern = re.compile(r"(?<=--)[^\.]*") | |||
|
|||
# Convert underscores to dashes and vice versa in argument names | |||
processed_args = [] | |||
processed_args = list[str]() |
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.
Improve the type annotations
try: | ||
value = json.loads(value_str) | ||
except json.decoder.JSONDecodeError: | ||
value = value_str |
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.
This is the main change in this PR which enables non-string values to be parsed correctly
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.
Looks good to me.
@dark I'll test this later today and will let you know. |
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: minpeter <kali2005611@gmail.com>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk> Signed-off-by: avigny <47987522+avigny@users.noreply.github.com>
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
FIX #19030 (comment)
Test Plan
Updated
test_config,py
Test Result
The test passes
(Optional) Documentation Update