You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOGGER.warning("Cache does not contain completion; likely due to recitation")
282
284
else:
283
285
LOGGER.warning(
284
286
f"Proportion of cache responses that contain empty completions ({prop_empty_completions}) is greater than threshold {empty_completion_threshold}. Likely due to recitation"
285
287
)
286
-
failed_cache_response=cached_result.responses
288
+
failed_cache_response=responses_list
287
289
cached_result=None
288
290
cached_response=None
289
291
else:
290
-
cached_response= (
291
-
cached_result.responses
292
-
) # We want a list of LLMResponses if we have n responses in a cache
292
+
cached_response=responses_list
293
293
ifinsufficient_valids_behaviour!="continue":
294
-
assert (
295
-
len(cached_result.responses) ==n
296
-
), f"cache is inconsistent with n={n}\n{cached_result.responses}"
294
+
assertlen(responses_list) ==n, f"cache is inconsistent with n={n}\n{responses_list}"
), f"There should be the same number of responses and failed_cache_responses! Instead we have {len(responses)} responses and {len(failed_cache_responses)} failed_cache_responses."
LOGGER.warning("Cache does not contain completion; likely due to recitation")
490
489
else:
491
490
LOGGER.warning(
492
491
f"Proportion of cache responses that contain empty completions ({prop_empty_completions}) is greater than threshold {empty_completion_threshold}. Likely due to recitation"
493
492
)
494
-
failed_cache_response=cached_result.responses
493
+
failed_cache_response=responses_list
495
494
cached_result=None
496
495
cached_response=None
497
496
else:
498
-
cached_response=cached_result.responses
497
+
cached_response=responses_list
499
498
ifinsufficient_valids_behaviour!="continue":
500
-
assert (
501
-
len(cached_result.responses) ==n
502
-
), f"cache is inconsistent with n={n}\n{cached_result.responses}"
499
+
assertlen(responses_list) ==n, f"cache is inconsistent with n={n}\n{responses_list}"
), f"There should be the same number of responses and failed_cache_responses! Instead we have {len(responses)} responses and {len(failed_cache_responses)} failed_cache_responses."
0 commit comments