Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
06a760d6
Unverified
Commit
06a760d6
authored
Jan 21, 2025
by
Cheng Kuan Yong Jason
Committed by
GitHub
Jan 20, 2025
Browse files
[bugfix] catch xgrammar unsupported array constraints (#12210)
Signed-off-by:
Jason Cheng
<
jasoncky96@gmail.com
>
parent
da751221
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vllm/model_executor/guided_decoding/utils.py
vllm/model_executor/guided_decoding/utils.py
+7
-0
No files found.
vllm/model_executor/guided_decoding/utils.py
View file @
06a760d6
...
...
@@ -20,6 +20,13 @@ def has_xgrammar_unsupported_json_features(schema: dict) -> bool:
]):
return
True
# Check for array unsupported keywords
if
obj
.
get
(
"type"
)
==
"array"
and
any
(
key
in
obj
for
key
in
[
"uniqueItems"
,
"contains"
,
"minContains"
,
"maxContains"
,
"minItems"
,
"maxItems"
]):
return
True
# Recursively check all nested objects and arrays
for
value
in
obj
.
values
():
if
isinstance
(
value
,
dict
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment