forked from Aider-AI/aider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrungrid.py
executable file
·61 lines (48 loc) · 1.32 KB
/
rungrid.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python
import subprocess
import sys
from aider.dump import dump # noqa: F401
def main():
models = [
"gpt-3.5-turbo-0301",
"gpt-3.5-turbo-0613",
# "gpt-3.5-turbo-16k-0613",
"gpt-3.5-turbo-1106",
# "gpt-4-0314",
# "gpt-4-0613",
]
edit_formats = [
"diff",
# "diff-func",
# "whole",
# "whole-func",
]
# for repeat in range(1, 2, 1):
for model in models:
for edit_format in edit_formats:
# dump(model, edit_format)
if "-func" in edit_format and "-03" in model:
continue
# if (model, edit_format) == ("gpt-3.5-turbo-16k-0613", "whole-func"):
# # sublist reliably hangs the API?
# continue
dirname = f"rungrid-nov-{model}-{edit_format}"
# dirname = f"rungrid-{model}-{edit_format}-repeat-{repeat}"
run(dirname, model, edit_format)
def run(dirname, model, edit_format):
cmd = [
"./benchmark/benchmark.py",
dirname,
"--model",
model,
"--edit-format",
edit_format,
"--threads",
"10",
"--cont",
]
print(" ".join(cmd))
subprocess.run(cmd, check=True)
if __name__ == "__main__":
status = main()
sys.exit(status)