Skip to content

Commit 9a43ff3

Browse files
committed
Turn off guide caching
1 parent c406da8 commit 9a43ff3

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

outlines/fsm/guide.py

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
)
1616

1717
from outlines import grammars
18-
from outlines.caching import cache
1918
from outlines.fsm.parsing import PartialLark, PartialParserState
2019

2120
if TYPE_CHECKING:
@@ -73,7 +72,6 @@ def copy(self):
7372
return self
7473

7574

76-
@cache()
7775
def cached_create_states_mapping(regex_string, tokenizer, *args, **kwargs):
7876
return uncached_create_states_mapping(regex_string, tokenizer, *args, **kwargs)
7977

tests/generate/test_integration_llamacpp.py

+1
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def test_llama_cpp_pre_tokenizer_remains_broken():
274274
generate.choice(model, ["skirt", "dress", "pen", "jacket"])
275275

276276

277+
@pytest.mark.skip("Caching for guide was temporarily turned off")
277278
def test_RegexGuide_caching(model, temp_cache_dir):
278279
import llama_cpp
279280

tests/generate/test_integration_transformers.py

+1
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def test_transformers_use_existing_model_and_tokenizer():
492492
assert isinstance(sequence, str)
493493

494494

495+
@pytest.mark.skip("Caching for guide was temporarily turned off")
495496
def test_RegexGuide_caching(temp_cache_dir):
496497
import outlines.caching
497498
from outlines.fsm.guide import cached_create_states_mapping

0 commit comments

Comments
 (0)