Add total_cost to summary stats
Browse files
neurogolf_solver/submission.py
CHANGED
|
@@ -110,6 +110,7 @@ def generate_submission(output_dir, results, costs_dict, active_tasks):
|
|
| 110 |
|
| 111 |
unsolved_count = len(active_tasks) - len(results)
|
| 112 |
total_score = sum(max(1.0, 25.0 - math.log(max(1, cost))) for cost in costs_dict.values())
|
|
|
|
| 113 |
|
| 114 |
return {
|
| 115 |
'n_files': n_files,
|
|
@@ -118,6 +119,7 @@ def generate_submission(output_dir, results, costs_dict, active_tasks):
|
|
| 118 |
'zip_size': zip_size,
|
| 119 |
'csv_path': csv_path,
|
| 120 |
'total_score': total_score,
|
|
|
|
| 121 |
'unsolved_count': unsolved_count,
|
| 122 |
'oversized': oversized,
|
| 123 |
}
|
|
@@ -142,6 +144,7 @@ def print_summary(results, submission_info, elapsed):
|
|
| 142 |
for f, sz in submission_info['oversized']:
|
| 143 |
print(f" {f}: {sz / 1024:.1f} KB")
|
| 144 |
|
| 145 |
-
print(f"
|
|
|
|
| 146 |
print(f"Solved: {len(results)} | Unsolved: {submission_info['unsolved_count']}")
|
| 147 |
print(f"Written: {submission_info['zip_path']} | {submission_info['csv_path']}")
|
|
|
|
| 110 |
|
| 111 |
unsolved_count = len(active_tasks) - len(results)
|
| 112 |
total_score = sum(max(1.0, 25.0 - math.log(max(1, cost))) for cost in costs_dict.values())
|
| 113 |
+
total_cost = sum(costs_dict.values())
|
| 114 |
|
| 115 |
return {
|
| 116 |
'n_files': n_files,
|
|
|
|
| 119 |
'zip_size': zip_size,
|
| 120 |
'csv_path': csv_path,
|
| 121 |
'total_score': total_score,
|
| 122 |
+
'total_cost': total_cost,
|
| 123 |
'unsolved_count': unsolved_count,
|
| 124 |
'oversized': oversized,
|
| 125 |
}
|
|
|
|
| 144 |
for f, sz in submission_info['oversized']:
|
| 145 |
print(f" {f}: {sz / 1024:.1f} KB")
|
| 146 |
|
| 147 |
+
print(f"\nEstimated LB score: {submission_info['total_score']:.1f}")
|
| 148 |
+
print(f"Total cost: {submission_info['total_cost']:,}")
|
| 149 |
print(f"Solved: {len(results)} | Unsolved: {submission_info['unsolved_count']}")
|
| 150 |
print(f"Written: {submission_info['zip_path']} | {submission_info['csv_path']}")
|