Spaces:
Sleeping
Sleeping
Andrea Maldonado
commited on
Commit
·
4df7226
1
Parent(s):
10ab34e
Removes unused run options
Browse files
main.py
CHANGED
@@ -22,37 +22,26 @@ def run(kwargs:dict, model_paramas_list: list, filename_list:list):
|
|
22 |
@return:
|
23 |
"""
|
24 |
params = kwargs[PARAMS]
|
25 |
-
run_option = 'baseline'
|
26 |
ft = EventLogFeatures(None)
|
27 |
augmented_ft = InstanceAugmentator()
|
28 |
gen = pd.DataFrame(columns=['log'])
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
GenerationPlotter(gen, model_params, output_path=model_params['output_path'], input_path=model_params['input_path'])
|
47 |
-
|
48 |
-
elif run_option == COMPARE:
|
49 |
-
if params[N_COMPONENTS] != 2:
|
50 |
-
raise ValueError(f'The parameter `{N_COMPONENTS}` has to be 2, but it\'s {params[N_COMPONENTS]}.')
|
51 |
-
ft = EventLogFeatures(**kwargs)
|
52 |
-
FeatureAnalyser(ft, params).compare(model_params_list)
|
53 |
-
else:
|
54 |
-
raise InvalidRunningOptionError(f'The run_option: `{run_option}` in the (json) configuration '
|
55 |
-
f'does not exists or it is not a loading option.\n')
|
56 |
|
57 |
|
58 |
if __name__=='__main__':
|
|
|
22 |
@return:
|
23 |
"""
|
24 |
params = kwargs[PARAMS]
|
|
|
25 |
ft = EventLogFeatures(None)
|
26 |
augmented_ft = InstanceAugmentator()
|
27 |
gen = pd.DataFrame(columns=['log'])
|
28 |
|
29 |
+
for model_params in model_params_list:
|
30 |
+
if model_params.get(PIPELINE_STEP) == 'instance_augmentation':
|
31 |
+
augmented_ft = InstanceAugmentator(aug_params=model_params, samples=ft.feat)
|
32 |
+
AugmentationPlotter(augmented_ft, model_params)
|
33 |
+
elif model_params.get(PIPELINE_STEP) == 'event_logs_generation':
|
34 |
+
gen = pd.DataFrame(GenerateEventLogs(model_params).log_config)
|
35 |
+
#gen = pd.read_csv("output/features/generated/grid_2objectives_enseef_enve/2_enseef_enve_feat.csv")
|
36 |
+
#GenerationPlotter(gen, model_params, output_path="output/plots")
|
37 |
+
elif model_params.get(PIPELINE_STEP) == 'benchmark_test':
|
38 |
+
benchmark = BenchmarkTest(model_params, event_logs=gen['log'])
|
39 |
+
# BenchmarkPlotter(benchmark.features, output_path="output/plots")
|
40 |
+
elif model_params.get(PIPELINE_STEP) == 'feature_extraction':
|
41 |
+
ft = EventLogFeatures(**kwargs, logs=gen['log'], ft_params=model_params)
|
42 |
+
FeaturesPlotter(ft.feat, model_params)
|
43 |
+
elif model_params.get(PIPELINE_STEP) == "evaluation_plotter":
|
44 |
+
GenerationPlotter(gen, model_params, output_path=model_params['output_path'], input_path=model_params['input_path'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
if __name__=='__main__':
|