We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15e2349 commit 94835b5Copy full SHA for 94835b5
tests/test_cache.py
@@ -117,14 +117,15 @@ def f(x):
117
def test_version_upgrade_cache_invalidate(test_cache, mocker):
118
"""Ensure we can change the signature of a cached function if we upgrade the version"""
119
120
+ import outlines.caching
121
+
122
def simulate_restart_outlines():
123
# clearing in-memory lru_cache which returns the diskcache in
124
# order to simulate a reload, we're not clearing the diskcache itself
125
outlines.caching.get_cache.cache_clear()
126
- import outlines.caching
-
127
mocker.patch("outlines._version.__version__", new="0.0.0")
128
+ simulate_restart_outlines()
129
130
# initialize cache with signature of Tuple-of-3
131
@test_cache
0 commit comments