From 8ae40860bc5b1ce58402f5f0a4f2e7779613b9fb Mon Sep 17 00:00:00 2001 From: Philippe Lelievre Date: Wed, 4 Sep 2024 15:49:00 -0400 Subject: [PATCH] fix: cache key as string --- outlines/caching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/outlines/caching.py b/outlines/caching.py index 6fdda6214..83b91755e 100644 --- a/outlines/caching.py +++ b/outlines/caching.py @@ -126,7 +126,8 @@ def wrapper(*args, **kwargs): def __cache_key__(*args, **kwargs): """Make key for cache given function arguments.""" - return args_to_key(base, args, kwargs, typed, ignore) + # return args_to_key(base, args, kwargs, typed, ignore) + return str(args_to_key(base, args, kwargs, typed, ignore)) wrapper.__cache_key__ = __cache_key__ # type: ignore wrapper.__memory__ = memory # type: ignore