mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
undo refac
This commit is contained in:
parent
fe1d7aa887
commit
6172a70ed3
1 changed files with 31 additions and 29 deletions
|
@ -94,45 +94,47 @@ def main():
|
||||||
)
|
)
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
if results:
|
if not results:
|
||||||
completed_tests += 1
|
continue
|
||||||
passed = results["tests_outcomes"][-1]
|
|
||||||
if passed:
|
|
||||||
for i in range(len(results["tests_outcomes"]) - 1, args.retries):
|
|
||||||
passed_tests[i] += 1
|
|
||||||
|
|
||||||
dump(completed_tests, total_tests)
|
completed_tests += 1
|
||||||
for i in range(args.retries):
|
passed = results["tests_outcomes"][-1]
|
||||||
pass_rate = 100 * passed_tests[i] / completed_tests
|
if passed:
|
||||||
dump(i, pass_rate)
|
for i in range(len(results["tests_outcomes"]) - 1, args.retries):
|
||||||
|
passed_tests[i] += 1
|
||||||
|
|
||||||
total_cost += results["cost"]
|
dump(completed_tests, total_tests)
|
||||||
dump(total_cost)
|
for i in range(args.retries):
|
||||||
|
pass_rate = 100 * passed_tests[i] / completed_tests
|
||||||
|
dump(i, pass_rate)
|
||||||
|
|
||||||
avg_cost = total_cost / completed_tests
|
total_cost += results["cost"]
|
||||||
dump(avg_cost)
|
dump(total_cost)
|
||||||
|
|
||||||
projected_cost = avg_cost * total_tests
|
avg_cost = total_cost / completed_tests
|
||||||
dump(projected_cost)
|
dump(avg_cost)
|
||||||
|
|
||||||
print(
|
projected_cost = avg_cost * total_tests
|
||||||
f"Cost: ${avg_cost:.4f} average, ${total_cost:.2f} total,"
|
dump(projected_cost)
|
||||||
f" ${projected_cost:.2f} projected"
|
|
||||||
)
|
|
||||||
|
|
||||||
duration += results["duration"]
|
print(
|
||||||
avg_duration = duration / completed_tests
|
f"Cost: ${avg_cost:.4f} average, ${total_cost:.2f} total,"
|
||||||
dump(avg_duration)
|
f" ${projected_cost:.2f} projected"
|
||||||
|
)
|
||||||
|
|
||||||
min_left = (total_tests - completed_tests) * avg_duration / 60
|
duration += results["duration"]
|
||||||
dump(min_left)
|
avg_duration = duration / completed_tests
|
||||||
|
dump(avg_duration)
|
||||||
|
|
||||||
print()
|
min_left = (total_tests - completed_tests) * avg_duration / 60
|
||||||
|
dump(min_left)
|
||||||
|
|
||||||
###
|
print()
|
||||||
# input('next?')
|
|
||||||
|
|
||||||
print(dirname / testname)
|
###
|
||||||
|
# input('next?')
|
||||||
|
|
||||||
|
print(dirname / testname)
|
||||||
|
|
||||||
|
|
||||||
def run_test(testdir, model_name, edit_format, retries, no_test, verbose):
|
def run_test(testdir, model_name, edit_format, retries, no_test, verbose):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue