You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According the the JSON schema documentation, an object in a JSON schema can set additionalProperties to false to limit the keys on an object. However this causes an error when using outlines.
I'm using outlines as the guided decoding backend for vLLM.
Call stack Traceback (most recent call last):
File "/data1/predict.py", line 288, in _generate_vllm
model_response = self.model.generate(llm_inputs, sampling_params, use_tqdm=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/utils.py", line 1063, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/entrypoints/llm.py", line 398, in generate
self._validate_and_add_requests(
File "/data1/pyenv/lib/python3.11/site-packages/vllm/entrypoints/llm.py", line 875, in _validate_and_add_requests
self._add_request(
File "/data1/pyenv/lib/python3.11/site-packages/vllm/entrypoints/llm.py", line 893, in _add_request
self.llm_engine.add_request(
File "/data1/pyenv/lib/python3.11/site-packages/vllm/utils.py", line 1063, in inner
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/engine/llm_engine.py", line 857, in add_request
self._add_processed_request(
File "/data1/pyenv/lib/python3.11/site-packages/vllm/engine/llm_engine.py", line 696, in _add_processed_request
seq_group = self._create_sequence_group_with_sampling(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/engine/llm_engine.py", line 910, in _create_sequence_group_with_sampling
sampling_params = self._build_logits_processors(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/engine/llm_engine.py", line 2056, in _build_logits_processors
processor = get_local_guided_decoding_logits_processor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/__init__.py", line 36, in get_local_guided_decoding_logits_processor
return get_local_outlines_guided_decoding_logits_processor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 91, in get_local_outlines_guided_decoding_logits_processor
return _get_logits_processor(guide, tokenizer, mode,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_decoding.py", line 127, in _get_logits_processor
return JSONLogitsProcessor(guide, tokenizer, whitespace_pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/vllm/model_executor/guided_decoding/outlines_logits_processors.py", line 150, in __init__
regex_string = build_regex_from_schema(schema_str, whitespace_pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/outlines/fsm/json_schema.py", line 86, in build_regex_from_schema
return to_regex(resolver, content, whitespace_pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/outlines/fsm/json_schema.py", line 451, in to_regex
value_pattern = to_regex(
^^^^^^^^^
File "/data1/pyenv/lib/python3.11/site-packages/outlines/fsm/json_schema.py", line 187, in to_regex
elif"properties"in instance:
^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type'bool' is not iterable
This is a pretty serious issue for my use case since the ability to set additionalProperties to false on an object is a pretty foundational feature of a JSON schema.
The text was updated successfully, but these errors were encountered:
Describe the issue as clearly as possible:
According the the JSON schema documentation, an object in a JSON schema can set
additionalProperties
tofalse
to limit the keys on an object. However this causes an error when using outlines.I'm using outlines as the guided decoding backend for vLLM.
Steps/code to reproduce the bug:
Expected result:
Error message:
Outlines/Python version information:
Version information
Context for the issue:
This is a pretty serious issue for my use case since the ability to set
additionalProperties
tofalse
on an object is a pretty foundational feature of a JSON schema.The text was updated successfully, but these errors were encountered: