forked from AbanteAI/archive-old-cli-mentat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharg_parser.py
71 lines (68 loc) · 1.81 KB
/
arg_parser.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
62
63
64
65
66
67
68
69
70
71
import argparse
def common_benchmark_parser():
parser = argparse.ArgumentParser(description="Run exercism benchmarks")
parser.add_argument(
"--refresh_repo",
action="store_true",
default=False,
help="When set local changes will be discarded.",
)
parser.add_argument(
"--language",
default="python",
type=str,
help="Which exercism language to do exercises for",
)
parser.add_argument(
"--benchmarks",
nargs="*",
default=[],
help=(
"Which benchmarks to run. max_benchmarks ignored when set. Exact meaning"
" depends on benchmark."
),
)
parser.add_argument(
"--directory",
"-d",
default="benchmarks/benchmarks",
type=str,
help="Directory from which to load benchmarks and/or samples",
)
parser.add_argument(
"--max_benchmarks",
default=1,
type=int,
help="The maximum number of exercises to run",
)
parser.add_argument(
"--max_iterations",
default=1,
type=int,
help="Number of times to rerun mentat with error messages",
)
parser.add_argument(
"--max_workers",
default=1,
type=int,
help="Number of workers to use for multiprocessing",
)
parser.add_argument(
"--retries",
action="store",
default=1,
type=int,
help="Number of times to retry a benchmark",
)
parser.add_argument(
"--repo",
action="store",
default="mentat",
help="For benchmarks that are evaluated against a repo",
)
parser.add_argument(
"--evaluate_baseline",
action="store_true",
help="Evaluate the baseline for the benchmark",
)
return parser