-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.py
More file actions
31 lines (22 loc) · 722 Bytes
/
runner.py
File metadata and controls
31 lines (22 loc) · 722 Bytes
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
import argparse
import sys
from runner.local_runner import LocalRunner
from runner.occp_runner import OCCPRunner
def main():
parser = argparse.ArgumentParser(description='Parse an integer argument')
parser.add_argument('--runtype', type=int, help='An integer argument')
args = parser.parse_args()
if args.runtype is not None:
print(f"Received runtype: {args.runtype}")
else:
print("No runtype argument provided.")
if args.runtype == 0:
runner = LocalRunner()
elif args.runtype == 1:
runner = OCCPRunner()
else:
raise ValueError("Invalid run type")
runner.run()
if __name__ == "__main__":
sys.setrecursionlimit(2147483647)
main()