-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
30 lines (22 loc) · 759 Bytes
/
run.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
from argparse import ArgumentParser, RawTextHelpFormatter
import subprocess
def main():
parser = ArgumentParser(formatter_class=RawTextHelpFormatter)
parser.add_argument(
"-s",
choices=["d", "m", "t"],
default="t",
help="Positional values to represent starting point\n"
" d : Download dataset\n"
" m : Train machine learning model\n"
" t : Predict on test input\n",
)
stage = parser.parse_args()
if stage.s == "d":
subprocess.call(["python", "data_downloader.py"])
elif stage.s == "m":
subprocess.call(["python", "data_modeler.py"])
elif stage.s == "t":
subprocess.call(["python", "performance_eval.py"])
if __name__ == "__main__":
main()