-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
53 lines (37 loc) · 1.59 KB
/
main.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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 9 21:26:13 2023
@author: gianatmaja
"""
import yaml
import subprocess
from pathlib import Path
class MasterLauncher:
def launchProcess(self, master_config):
if (master_config['task']['eda'] == True):
script_path = 'src/pipeline/eda.py'
subprocess.run(['python', script_path])
if (master_config['task']['model_experimentation'] == True):
script_path = 'src/pipeline/model_experimentation.py'
subprocess.run(['python', script_path])
if (master_config['task']['model_finalization'] == True):
script_path = 'src/pipeline/model_saving.py'
subprocess.run(['python', script_path])
if (master_config['task']['model_explainability'] == True):
script_path = 'src/pipeline/model_explanation.py'
subprocess.run(['python', script_path])
if (master_config['task']['data_drift_analysis'] == True):
script_path = 'src/pipeline/data_drift.py'
subprocess.run(['python', script_path])
if (master_config['task']['bias_analysis_data_prep'] == True):
script_path = 'src/pipeline/bias_analysis_prep.py'
subprocess.run(['python', script_path])
return None
if __name__ == '__main__':
# Launch launcher
master_launcher = MasterLauncher()
# Get config file
master_config = yaml.safe_load(Path('config.yml').read_text())
# Execute
master_launcher.launchProcess(master_config)