From 930fa3de8ac8feecbba93c472c49261303f705ab Mon Sep 17 00:00:00 2001 From: Christopher Milan Date: Fri, 26 Sep 2025 16:03:37 -0700 Subject: [PATCH] diskcache_put --- tinygrad/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinygrad/helpers.py b/tinygrad/helpers.py index e004f8b058..62ccd61a8d 100644 --- a/tinygrad/helpers.py +++ b/tinygrad/helpers.py @@ -262,9 +262,9 @@ def diskcache_get(table:str, key:dict|str|bytes|int) -> Any: return None _db_tables = set() -def diskcache_put(table:str, key:dict|str|int, val:Any, prepickled=False): +def diskcache_put(table:str, key:dict|str|bytes|int, val:Any, prepickled=False): if CACHELEVEL < 1: return val - if isinstance(key, (str,int)): key = {"key": key} + if isinstance(key, (str,bytes,int)): key = {"key": key} conn = db_connection() cur = conn.cursor() if table not in _db_tables: