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:
remaining_reqs = []
warned = False
# 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):
hsh = hash_args(attr, req.args)
if attr == "greedy_until" and req.args[1].get("do_sample", False):
......@@ -188,7 +190,7 @@ class CachingLM:
# (else every "randomly sampled" generation would be identical for repeats > 1).
if not warned:
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
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