mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
chore: update outlines
function call to new name
this is introduces since version 0.32 with this pull request https://github.com/outlines-dev/outlines/pull/556 It changes the function name from `build_regex_from_object` to `build_regex_from_schema` This leads to an error in newer docker containers when starting tgi.
This commit is contained in:
parent
0d72af5ab0
commit
a122582bc7
@ -34,7 +34,7 @@ peft = { version = "^0.9.0", optional = true }
|
||||
torch = { version = "^2.1.1", optional = true }
|
||||
scipy = "^1.11.1"
|
||||
pillow = "^10.0.0"
|
||||
outlines= { version = "^0.0.27", optional = true }
|
||||
outlines= { version = "^0.0.32", optional = true }
|
||||
|
||||
[tool.poetry.extras]
|
||||
torch = ["torch"]
|
||||
|
@ -6,7 +6,7 @@ from typing import Dict, Union
|
||||
from text_generation_server.pb.generate_pb2 import GrammarType
|
||||
|
||||
from outlines.fsm.fsm import RegexFSM
|
||||
from outlines.fsm.json_schema import build_regex_from_object
|
||||
from outlines.fsm.json_schema import build_regex_from_schema
|
||||
from functools import lru_cache
|
||||
from typing import List, Optional, DefaultDict
|
||||
import time
|
||||
@ -512,7 +512,7 @@ class GrammarLogitProcessor(LogitsProcessor):
|
||||
def _cached_compile_fsm(grammar_type, schema, tokenizer):
|
||||
start_time = time.time()
|
||||
if grammar_type == GrammarType.GRAMMAR_TYPE_JSON:
|
||||
schema = build_regex_from_object(schema)
|
||||
schema = build_regex_from_schema(schema)
|
||||
elif grammar_type == GrammarType.GRAMMAR_TYPE_REGEX:
|
||||
pass # schema is already a regex just here for clarity
|
||||
fsm = RegexFSM(schema, tokenizer)
|
||||
|
Loading…
Reference in New Issue
Block a user