Tsukihjy/testcase / methods /lcb /check_failed.py
Tsukihjy's picture
download
raw
1.01 kB
from load_response import get_response_function
data = get_response_function(repsonse_path="/home/luoxianzhen/yang/data/response-orginal/orginal_response_{}_{}.jsonl", model_name="Qwen2.5-7B-Instruct", test_al="lcb")
total_gen_func = 0
failed_func = 0
fail_ti = 0
no_gen = 0
for data_item in data:
random_func_list = data_item['func_list'].get('random', [])
edge_func_list = data_item['func_list'].get('eage', [])
total_gen_func += len(random_func_list)
total_gen_func += len(edge_func_list)
is_wrong = False
temp_count = 0
for random_func in random_func_list+edge_func_list:
try:
exec(random_func)
except Exception as e:
print(e)
failed_func += 1
temp_count += 1
is_wrong = True
if is_wrong:
fail_ti+=1
if temp_count == len(random_func_list+edge_func_list):
no_gen += 1
print(f"total {total_gen_func} | failed {failed_func} | contain {fail_ti} | no gen {no_gen}")

Xet Storage Details

Size:
1.01 kB
·
Xet hash:
b18cd6619444081e53196aaf04d9f39527cec2fbe548a92f435cd8dae61b3ac6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.