mirror of
https://github.com/web-arena-x/webarena.git
synced 2026-02-06 11:16:53 +00:00
print unfinished examples
This commit is contained in:
parent
df87757d47
commit
3d3d837771
@ -28,6 +28,7 @@ def merge_logs(result_folder: str, args: argparse.Namespace) -> str:
|
||||
cur_log
|
||||
and index
|
||||
and os.path.exists(f"{result_folder}/render_{index}.html")
|
||||
and len(cur_log) >= 3
|
||||
):
|
||||
merged_results[index] = cur_log
|
||||
# update index and log
|
||||
@ -36,7 +37,13 @@ def merge_logs(result_folder: str, args: argparse.Namespace) -> str:
|
||||
else:
|
||||
cur_log.append(line)
|
||||
|
||||
if os.path.exists(f"{result_folder}/render_{index}.html"):
|
||||
if (
|
||||
cur_log
|
||||
and index
|
||||
and os.path.exists(f"{result_folder}/render_{index}.html")
|
||||
and len(cur_log) >= 3
|
||||
):
|
||||
|
||||
merged_results[index] = cur_log
|
||||
|
||||
# sort by the key
|
||||
@ -68,6 +75,12 @@ def merge_logs(result_folder: str, args: argparse.Namespace) -> str:
|
||||
for idx in unlog_examples:
|
||||
os.remove(f"{args.result_folder}/render_{idx}.html")
|
||||
|
||||
unifinished_examples = [
|
||||
i for i in range(0, 812) if str(i) not in merged_results
|
||||
]
|
||||
print(f"Number of unfinished examples: {len(unifinished_examples)}")
|
||||
print(unifinished_examples)
|
||||
|
||||
return merged_log_path
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user