-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
54 lines (40 loc) · 1.4 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import sys
import json
import os
sys.path.insert(0, 'src')
from etl import move_data
from eda import main_eda
from utils import convert_notebook
from tuning import find_metrics
from generate import create_launch_files
def main(targets):
data_config = json.load(open('config/data-params.json'))
eda_config = json.load(open('config/eda-params.json'))
tuning_config = json.load(open('config/tuning-params.json'))
generate_config = json.load(open('config/generate-params.json'))
test_config = json.load(open('config/test-params.json'))
if 'data' in targets:
move_data(**data_config)
if 'eda' in targets:
main_eda(**eda_config)
# execute notebook / convert to html
convert_notebook(**eda_config)
if 'tune' in targets:
find_metrics(**tuning_config)
if 'generate' in targets:
create_launch_files(**generate_config)
if 'test' in targets:
move_data(**test_config)
main_eda(**eda_config)
convert_notebook(**eda_config)
find_metrics(**tuning_config)
create_launch_files(**generate_config)
if 'all' in targets:
move_data(**data_config)
main_eda(**eda_config)
convert_notebook(**eda_config)
find_metrics(**tuning_config)
create_launch_files(**generate_config)
if __name__ == '__main__':
targets = sys.argv[1:]
main(targets)