mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-06-08 18:25:54 +02:00
Constructiontasks store average success across all tasks
This commit is contained in:
parent
e8e8212832
commit
afded138d0
1 changed files with 19 additions and 4 deletions
|
@ -110,6 +110,15 @@ def aggregate_results(local_folders):
|
||||||
total = 0
|
total = 0
|
||||||
successful = 0
|
successful = 0
|
||||||
successful_tasks = []
|
successful_tasks = []
|
||||||
|
|
||||||
|
task_type = local_folders[0].split("/")[-2]
|
||||||
|
if "cooking" in task_type:
|
||||||
|
task_type = "cooking"
|
||||||
|
elif "techtree" in task_type:
|
||||||
|
task_type = "techtree"
|
||||||
|
elif "construction" in task_type:
|
||||||
|
task_type = "construction"
|
||||||
|
|
||||||
for folder_path in tqdm(local_folders):
|
for folder_path in tqdm(local_folders):
|
||||||
folder_name = os.path.basename(folder_path)
|
folder_name = os.path.basename(folder_path)
|
||||||
|
|
||||||
|
@ -126,8 +135,8 @@ def aggregate_results(local_folders):
|
||||||
|
|
||||||
successful_tasks.sort()
|
successful_tasks.sort()
|
||||||
|
|
||||||
for i in successful_tasks:
|
if task_type == "construction":
|
||||||
print(f"Successful task: {i}")
|
successful = successful / total
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"total": total,
|
"total": total,
|
||||||
|
@ -172,8 +181,14 @@ def check_folder_results(folder_path):
|
||||||
# Print summary
|
# Print summary
|
||||||
print("\n=== Evaluation Results ===")
|
print("\n=== Evaluation Results ===")
|
||||||
print(f"Total tasks evaluated: {results['total']}")
|
print(f"Total tasks evaluated: {results['total']}")
|
||||||
print(f"Successful tasks: {results['successful']}")
|
|
||||||
print(f"Success rate: {results['success_rate']:.2%}")
|
if "construction" not in folder_path:
|
||||||
|
print(f"Successful tasks: {results['successful']}")
|
||||||
|
|
||||||
|
if "construction" not in folder_path:
|
||||||
|
print(f"Success rate: {results['success_rate']:.2f}")
|
||||||
|
else:
|
||||||
|
print(f"Success rate: {results['successful']:.2f}")
|
||||||
|
|
||||||
return results
|
return results
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue