"llm/vscode:/vscode.git/clone" did not exist on "3b4bab3dc55c615a14b1ae74ea64815d3891b5b0"
Commit 7ffb74ce authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

make cache-loading msg part of logger

parent b2fb53d4
...@@ -180,7 +180,9 @@ class CachingLM: ...@@ -180,7 +180,9 @@ class CachingLM:
remaining_reqs = [] remaining_reqs = []
warned = False warned = False
# figure out which ones are cached and which ones are new # figure out which ones are cached and which ones are new
print(f"Loading '{attr}' responses from cache '{self.cache_db}' where possible") eval_logger.info(
f"Loading '{attr}' responses from cache '{self.cache_db}' where possible..."
)
for req in tqdm(requests): for req in tqdm(requests):
hsh = hash_args(attr, req.args) hsh = hash_args(attr, req.args)
if attr == "greedy_until" and req.args[1].get("do_sample", False): if attr == "greedy_until" and req.args[1].get("do_sample", False):
...@@ -188,7 +190,7 @@ class CachingLM: ...@@ -188,7 +190,7 @@ class CachingLM:
# (else every "randomly sampled" generation would be identical for repeats > 1). # (else every "randomly sampled" generation would be identical for repeats > 1).
if not warned: if not warned:
eval_logger.warning( eval_logger.warning(
f"Arguments to lm.greedy_until() '{req.args[1]}' include non-deterministic sampling. Caching will not be performed." f"Arguments to lm.greedy_until() '{req.args[1]}' include non-deterministic sampling. Caching will not be performed for such requests."
) )
warned = True warned = True
res.append(None) res.append(None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment