outlines icon indicating copy to clipboard operation
outlines copied to clipboard

Disable regex caching in tests

Open brandonwillard opened this issue 1 year ago • 3 comments

Describe the issue as clearly as possible:

Tests like test_regex_vocabulary_error can fail due to the caching of create_states_mapping.

Caching should probably be disabled somewhat generally in those test modules (except for tests that are specifically for caching, of course).

Steps/code to reproduce the bug:

NA

Expected result:

NA

Error message:

No response

Outlines/Python version information:

4934425cc511b7f7fcfff76744edb8f1452feb8f

Context for the issue:

No response

brandonwillard avatar Apr 30 '24 23:04 brandonwillard

@brandonwillard could you please ensure https://github.com/outlines-dev/outlines/pull/886 resolves the issue on your end or provide reproduction steps?

lapp0 avatar May 10 '24 11:05 lapp0

@brandonwillard could you please ensure #886 resolves the issue on your end or provide reproduction steps?

There's no need for that; we shouldn't be caching the operations we're testing when we aren't testing the caching itself.

brandonwillard avatar May 10 '24 12:05 brandonwillard

Yep, the PR disables caching on everything except tests.test_cache and tests.benchmark (benchmarks have their own cache handling)

lapp0 avatar May 10 '24 13:05 lapp0