Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable regex caching in tests #853

Open
brandonwillard opened this issue Apr 30, 2024 · 3 comments
Open

Disable regex caching in tests #853

brandonwillard opened this issue Apr 30, 2024 · 3 comments
Labels
bug help wanted structured generation Linked to structured generation tests Linked to library tests

Comments

@brandonwillard
Copy link
Contributor

brandonwillard commented Apr 30, 2024

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:

4934425

Context for the issue:

No response

@lapp0
Copy link
Contributor

lapp0 commented May 10, 2024

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

@brandonwillard
Copy link
Contributor Author

@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.

@lapp0
Copy link
Contributor

lapp0 commented May 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted structured generation Linked to structured generation tests Linked to library tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants