Andrea Maldonado commited on
Commit
5dfc7b9
·
1 Parent(s): ed67acd

Prepares pip working pip release

Browse files
Files changed (5) hide show
  1. .conda.yml +138 -61
  2. gedi/__init__.py +2 -6
  3. gedi/run.py +54 -0
  4. main.py +2 -44
  5. setup.py +49 -4
.conda.yml CHANGED
@@ -3,78 +3,155 @@ channels:
3
  - defaults
4
  - conda-forge
5
  dependencies:
 
 
 
 
6
  - certifi=2024.2.2=pyhd8ed1ab_0
 
 
7
  - cycler=0.12.1=pyhd8ed1ab_0
8
- - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
9
- - font-ttf-inconsolata=3.000=h77eed37_0
10
- - font-ttf-source-code-pro=2.038=h77eed37_0
11
- - font-ttf-ubuntu=0.83=h77eed37_1
12
- - fonts-conda-ecosystem=1=0
13
- - fonts-conda-forge=1=0
14
- - importlib-resources=6.1.2=pyhd8ed1ab_0
15
- - importlib_resources=6.1.2=pyhd8ed1ab_0
16
- - joblib=1.3.2=pyhd8ed1ab_0
 
 
 
 
 
 
 
 
17
  - munkres=1.1.4=pyh9f0ad1d_0
18
- - packaging=23.2=pyhd8ed1ab_0
 
 
 
 
 
19
  - pip=24.0=pyhd8ed1ab_0
20
- - ply=3.11=py_1
21
- - pyparsing=3.1.1=pyhd8ed1ab_0
 
 
 
 
 
 
22
  - python-dateutil=2.9.0=pyhd8ed1ab_0
23
  - python-tzdata=2024.1=pyhd8ed1ab_0
24
  - python_abi=3.9=4_cp39
25
  - pytz=2024.1=pyhd8ed1ab_0
26
- - setuptools=69.1.1=pyhd8ed1ab_0
 
 
27
  - six=1.16.0=pyh6c4a22f_0
28
- - threadpoolctl=3.3.0=pyhc1e730c_0
 
 
29
  - toml=0.10.2=pyhd8ed1ab_0
30
  - tomli=2.0.1=pyhd8ed1ab_0
 
 
31
  - tzdata=2024a=h0c530f3_0
32
- - wheel=0.42.0=pyhd8ed1ab_0
 
 
 
33
  - zipp=3.17.0=pyhd8ed1ab_0
34
  - pip:
35
- - click==8.1.7
36
- - cloudpickle==3.0.0
37
- - configspace==0.7.1
38
- - cvxopt==1.3.2
39
- - dask==2024.2.1
40
- - dask-jobqueue==0.8.5
41
- - deprecation==2.1.0
42
- - distributed==2024.2.1
43
- - emcee==3.1.4
44
- - feeed == 1.2.0
45
- - fsspec==2024.2.0
46
- - imbalanced-learn==0.12.0
47
- - imblearn==0.0
48
- - importlib-metadata==7.0.1
49
- - intervaltree==3.1.0
50
- - jinja2==3.1.3
51
- - levenshtein==0.23.0
52
- - locket==1.0.0
53
- - lxml==5.1.0
54
- - markupsafe==2.1.5
55
- - more-itertools==10.2.0
56
- - msgpack==1.0.8
57
- - networkx==3.2.1
58
- - numpy==1.26.4
59
- - pandas==2.0.0
60
- - partd==1.4.1
61
- - pm4py==2.7.2
62
- - psutil==5.9.8
63
- - pydotplus==2.0.2
64
- - pynisher==1.0.10
65
- - pyrfr==0.9.0
66
- - pyyaml==6.0.1
67
- - rapidfuzz==3.6.1
68
- - regex==2023.12.25
69
- - scikit-learn==1.2.2
70
- - scipy==1.10.1
71
- - seaborn==0.13.2
72
- - smac==2.0.2
73
- - sortedcontainers==2.4.0
74
- - stringdist==1.0.9
75
- - tblib==3.0.0
76
- - toolz==0.12.1
77
- - tqdm==4.65.0
78
- - typing-extensions==4.10.0
79
- - urllib3==2.2.1
80
- - zict==3.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  - defaults
4
  - conda-forge
5
  dependencies:
6
+ - asttokens=2.4.1=pyhd8ed1ab_0
7
+ - backcall=0.2.0=pyh9f0ad1d_0
8
+ - bzip2=1.0.8=hfdf4475_7
9
+ - ca-certificates=2024.7.4=h8857fd0_0
10
  - certifi=2024.2.2=pyhd8ed1ab_0
11
+ - colorama=0.4.6=pyhd8ed1ab_0
12
+ - comm=0.2.2=pyhd8ed1ab_0
13
  - cycler=0.12.1=pyhd8ed1ab_0
14
+ - decorator=5.1.1=pyhd8ed1ab_0
15
+ - executing=2.0.1=pyhd8ed1ab_0
16
+ - importlib-metadata=7.1.0=pyha770c72_0
17
+ - importlib-resources=6.4.0=pyhd8ed1ab_0
18
+ - importlib_metadata=7.1.0=hd8ed1ab_0
19
+ - importlib_resources=6.4.0=pyhd8ed1ab_0
20
+ - jedi=0.19.1=pyhd8ed1ab_0
21
+ - joblib=1.4.0=pyhd8ed1ab_0
22
+ - jupyter_client=8.6.1=pyhd8ed1ab_0
23
+ - krb5=1.21.3=h37d8d59_0
24
+ - libcxx=18.1.8=hd876a4e_6
25
+ - libedit=3.1.20191231=h0678c8f_2
26
+ - libffi=3.4.2=h0d85af4_5
27
+ - libsodium=1.0.18=hbcb3906_1
28
+ - libsqlite=3.46.0=h1b8f9f3_0
29
+ - libzlib=1.3.1=h87427d6_1
30
+ - matplotlib-inline=0.1.7=pyhd8ed1ab_0
31
  - munkres=1.1.4=pyh9f0ad1d_0
32
+ - ncurses=6.5=hf036a51_1
33
+ - nest-asyncio=1.6.0=pyhd8ed1ab_0
34
+ - openssl=3.3.1=hd23fc13_3
35
+ - packaging=24.0=pyhd8ed1ab_0
36
+ - parso=0.8.4=pyhd8ed1ab_0
37
+ - pickleshare=0.7.5=py_1003
38
  - pip=24.0=pyhd8ed1ab_0
39
+ - platformdirs=4.2.0=pyhd8ed1ab_0
40
+ - ply=3.11=pyhd8ed1ab_2
41
+ - prompt-toolkit=3.0.42=pyha770c72_0
42
+ - prompt_toolkit=3.0.42=hd8ed1ab_0
43
+ - pure_eval=0.2.2=pyhd8ed1ab_0
44
+ - pygments=2.17.2=pyhd8ed1ab_0
45
+ - pyparsing=3.1.2=pyhd8ed1ab_0
46
+ - python=3.9.19=h7a9c478_0_cpython
47
  - python-dateutil=2.9.0=pyhd8ed1ab_0
48
  - python-tzdata=2024.1=pyhd8ed1ab_0
49
  - python_abi=3.9=4_cp39
50
  - pytz=2024.1=pyhd8ed1ab_0
51
+ - pyzmq=26.2.0=py39ha6bd863_0
52
+ - readline=8.2=h9e318b2_1
53
+ - setuptools=69.5.1=pyhd8ed1ab_0
54
  - six=1.16.0=pyh6c4a22f_0
55
+ - stack_data=0.6.2=pyhd8ed1ab_0
56
+ - threadpoolctl=3.4.0=pyhc1e730c_0
57
+ - tk=8.6.13=h1abcd95_1
58
  - toml=0.10.2=pyhd8ed1ab_0
59
  - tomli=2.0.1=pyhd8ed1ab_0
60
+ - traitlets=5.14.3=pyhd8ed1ab_0
61
+ - typing_extensions=4.11.0=pyha770c72_0
62
  - tzdata=2024a=h0c530f3_0
63
+ - wcwidth=0.2.13=pyhd8ed1ab_0
64
+ - wheel=0.43.0=pyhd8ed1ab_1
65
+ - xz=5.2.6=h775f41a_0
66
+ - zeromq=4.3.5=hde137ed_4
67
  - zipp=3.17.0=pyhd8ed1ab_0
68
  - pip:
69
+ - altair==5.3.0
70
+ - appnope==0.1.4
71
+ - attrs==23.2.0
72
+ - blinker==1.8.2
73
+ - brotli==1.1.0
74
+ - cachetools==5.4.0
75
+ - charset-normalizer==3.3.2
76
+ - click==8.1.7
77
+ - cloudpickle==3.0.0
78
+ - configspace==0.7.1
79
+ - contourpy==1.2.1
80
+ - cvxopt==1.3.2
81
+ - dask==2024.4.1
82
+ - dask-jobqueue==0.8.5
83
+ - debugpy==1.8.1
84
+ - deprecation==2.1.0
85
+ - distributed==2024.4.1
86
+ - emcee==3.1.4
87
+ - feeed==1.2.0
88
+ - fonttools==4.51.0
89
+ - fsspec==2024.3.1
90
+ - gitdb==4.0.11
91
+ - gitpython==3.1.43
92
+ - idna==3.7
93
+ - imbalanced-learn==0.12.2
94
+ - imblearn==0.0
95
+ - intervaltree==3.1.0
96
+ - ipykernel==6.29.3
97
+ - ipython==8.12.0
98
+ - jinja2==3.1.3
99
+ - jsonschema==4.23.0
100
+ - jsonschema-specifications==2023.12.1
101
+ - jupyter-core==5.7.2
102
+ - kiwisolver==1.4.5
103
+ - levenshtein==0.23.0
104
+ - llvmlite==0.42.0
105
+ - locket==1.0.0
106
+ - lxml==5.2.1
107
+ - markdown-it-py==3.0.0
108
+ - markupsafe==2.1.5
109
+ - matplotlib==3.8.4
110
+ - mdurl==0.1.2
111
+ - more-itertools==10.2.0
112
+ - msgpack==1.0.8
113
+ - networkx==3.2.1
114
+ - numba==0.59.1
115
+ - numpy==1.26.4
116
+ - opyenxes==0.3.0
117
+ - pandas==2.2.2
118
+ - partd==1.4.1
119
+ - pexpect==4.9.0
120
+ - pillow==10.4.0
121
+ - pm4py==2.7.2
122
+ - protobuf==5.27.2
123
+ - psutil==6.0.0
124
+ - ptyprocess==0.7.0
125
+ - pyarrow==17.0.0
126
+ - pydeck==0.9.1
127
+ - pydotplus==2.0.2
128
+ - pynisher==1.0.10
129
+ - pyrfr==0.9.0
130
+ - python-graphviz==0.20.3
131
+ - pyyaml==6.0.1
132
+ - rapidfuzz==3.8.1
133
+ - referencing==0.35.1
134
+ - regex==2023.12.25
135
+ - requests==2.32.3
136
+ - rich==13.7.1
137
+ - rpds-py==0.19.0
138
+ - scikit-learn==1.2.2
139
+ - scipy==1.13.0
140
+ - seaborn==0.13.2
141
+ - slicer==0.0.8
142
+ - smac==2.0.2
143
+ - smmap==5.0.1
144
+ - sortedcontainers==2.4.0
145
+ - streamlit==1.36.0
146
+ - stringdist==1.0.9
147
+ - tabulate==0.9.0
148
+ - tblib==3.0.0
149
+ - tenacity==8.5.0
150
+ - toolz==0.12.1
151
+ - tornado==6.4
152
+ - tqdm==4.65.0
153
+ - urllib3==2.2.1
154
+ - watchdog==4.0.1
155
+ - xgboost==2.1.0
156
+ - zict==3.0.0
157
+ - zstd==1.5.5.1
gedi/__init__.py CHANGED
@@ -1,7 +1,3 @@
1
- from .generator import GenerateEventLogs
2
- from .features import EventLogFeatures
3
- from .augmentation import InstanceAugmentator
4
- from .benchmark import BenchmarkTest
5
- from .plotter import BenchmarkPlotter, FeaturesPlotter, AugmentationPlotter, GenerationPlotter
6
 
7
- __all__=[ 'GenerateEventLogs', 'EventLogFeatures', 'FeatureAnalyser', 'InstanceAugmentator', 'BenchmarkTest', 'BenchmarkPlotter', 'FeaturesPlotter', 'AugmentationPlotter', 'GenerationPlotter']
 
1
+ from .run import gedi
 
 
 
 
2
 
3
+ __all__=['gedi']
gedi/run.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import config
2
+ import pandas as pd
3
+ from datetime import datetime as dt
4
+ from gedi.generator import GenerateEventLogs
5
+ from gedi.features import EventLogFeatures
6
+ from gedi.augmentation import InstanceAugmentator
7
+ from gedi.benchmark import BenchmarkTest
8
+ from gedi.plotter import BenchmarkPlotter, FeaturesPlotter, AugmentationPlotter, GenerationPlotter
9
+ from utils.default_argparse import ArgParser
10
+ from utils.param_keys import *
11
+
12
+ def run(kwargs:dict, model_params_list: list, filename_list:list):
13
+ """
14
+ This function chooses the running option for the program.
15
+ @param kwargs: dict
16
+ contains the running parameters and the event-log file information
17
+ @param model_params_list: list
18
+ contains a list of model parameters, which are used to analyse this different models.
19
+ @param filename_list: list
20
+ contains the list of the filenames to load multiple event-logs
21
+ @return:
22
+ """
23
+ params = kwargs[PARAMS]
24
+ ft = EventLogFeatures(None)
25
+ augmented_ft = InstanceAugmentator()
26
+ gen = pd.DataFrame(columns=['log'])
27
+
28
+ for model_params in model_params_list:
29
+ if model_params.get(PIPELINE_STEP) == 'instance_augmentation':
30
+ augmented_ft = InstanceAugmentator(aug_params=model_params, samples=ft.feat)
31
+ AugmentationPlotter(augmented_ft, model_params)
32
+ elif model_params.get(PIPELINE_STEP) == 'event_logs_generation':
33
+ gen = pd.DataFrame(GenerateEventLogs(model_params).log_config)
34
+ #gen = pd.read_csv("output/features/generated/grid_2objectives_enseef_enve/2_enseef_enve_feat.csv")
35
+ #GenerationPlotter(gen, model_params, output_path="output/plots")
36
+ return gen
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
+ def gedi(config_path):
47
+ """
48
+ This function runs the GEDI pipeline.
49
+ @param config_path: str
50
+ contains the path to the config file
51
+ @return:
52
+ """
53
+ model_params_list = config.get_model_params_list(config_path)
54
+ run({'params':""}, model_params_list, [])
main.py CHANGED
@@ -1,54 +1,12 @@
1
  import config
2
- import pandas as pd
3
  from datetime import datetime as dt
4
- from gedi.generator import GenerateEventLogs
5
- from gedi.features import EventLogFeatures
6
- from gedi.augmentation import InstanceAugmentator
7
- from gedi.benchmark import BenchmarkTest
8
- from gedi.plotter import BenchmarkPlotter, FeaturesPlotter, AugmentationPlotter, GenerationPlotter
9
  from utils.default_argparse import ArgParser
10
  from utils.param_keys import *
11
 
12
- def run(kwargs:dict, model_paramas_list: list, filename_list:list):
13
- """
14
- This function chooses the running option for the program.
15
- @param kwargs: dict
16
- contains the running parameters and the event-log file information
17
- @param model_params_list: list
18
- contains a list of model parameters, which are used to analyse this different models.
19
- @param filename_list: list
20
- contains the list of the filenames to load multiple event-logs
21
- @return:
22
- """
23
- params = kwargs[PARAMS]
24
- ft = EventLogFeatures(None)
25
- augmented_ft = InstanceAugmentator()
26
- gen = pd.DataFrame(columns=['log'])
27
-
28
- for model_params in model_params_list:
29
- if model_params.get(PIPELINE_STEP) == 'instance_augmentation':
30
- augmented_ft = InstanceAugmentator(aug_params=model_params, samples=ft.feat)
31
- AugmentationPlotter(augmented_ft, model_params)
32
- elif model_params.get(PIPELINE_STEP) == 'event_logs_generation':
33
- gen = pd.DataFrame(GenerateEventLogs(model_params).log_config)
34
- #gen = pd.read_csv("output/features/generated/grid_2objectives_enseef_enve/2_enseef_enve_feat.csv")
35
- #GenerationPlotter(gen, model_params, output_path="output/plots")
36
- elif model_params.get(PIPELINE_STEP) == 'benchmark_test':
37
- benchmark = BenchmarkTest(model_params, event_logs=gen['log'])
38
- # BenchmarkPlotter(benchmark.features, output_path="output/plots")
39
- elif model_params.get(PIPELINE_STEP) == 'feature_extraction':
40
- ft = EventLogFeatures(**kwargs, logs=gen['log'], ft_params=model_params)
41
- FeaturesPlotter(ft.feat, model_params)
42
- elif model_params.get(PIPELINE_STEP) == "evaluation_plotter":
43
- GenerationPlotter(gen, model_params, output_path=model_params['output_path'], input_path=model_params['input_path'])
44
-
45
-
46
  if __name__=='__main__':
47
  start_gedi = dt.now()
48
  print(f'INFO: GEDI starting {start_gedi}')
49
-
50
  args = ArgParser().parse('GEDI main')
51
- model_params_list = config.get_model_params_list(args.alg_params_json)
52
- run({'params':""}, model_params_list, [])
53
-
54
  print(f'SUCCESS: GEDI took {dt.now()-start_gedi} sec.')
 
1
  import config
 
2
  from datetime import datetime as dt
3
+ from gedi.run import gedi, run
 
 
 
 
4
  from utils.default_argparse import ArgParser
5
  from utils.param_keys import *
6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  if __name__=='__main__':
8
  start_gedi = dt.now()
9
  print(f'INFO: GEDI starting {start_gedi}')
 
10
  args = ArgParser().parse('GEDI main')
11
+ gedi(args.alg_params_json)
 
 
12
  print(f'SUCCESS: GEDI took {dt.now()-start_gedi} sec.')
setup.py CHANGED
@@ -4,7 +4,7 @@ import os
4
  with open("README.md", "r") as fh:
5
  long_description = fh.read()
6
 
7
- version_string = os.environ.get("VERSION_PLACEHOLDER", "0.0.1")
8
  print(version_string)
9
  version = version_string
10
 
@@ -25,14 +25,59 @@ setup(
25
  'Levenshtein==0.23.0',
26
  'matplotlib==3.8.4',
27
  'numpy==1.26.4',
28
- 'pandas==2.2.2',
29
  'pm4py==2.7.2',
30
  'scikit-learn==1.2.2',
31
- 'scipy==1.13.0',
32
  'seaborn==0.13.2',
33
  'smac==2.0.2',
34
  'tqdm==4.65.0',
35
- 'streamlit-toggle-switch>=1.0.2'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ],
37
  packages = ['gedi'],
38
  classifiers=[
 
4
  with open("README.md", "r") as fh:
5
  long_description = fh.read()
6
 
7
+ version_string = os.environ.get("VERSION_PLACEHOLDER", "0.0.2")
8
  print(version_string)
9
  version = version_string
10
 
 
25
  'Levenshtein==0.23.0',
26
  'matplotlib==3.8.4',
27
  'numpy==1.26.4',
 
28
  'pm4py==2.7.2',
29
  'scikit-learn==1.2.2',
30
+ 'scipy==1.10.1',
31
  'seaborn==0.13.2',
32
  'smac==2.0.2',
33
  'tqdm==4.65.0',
34
+ 'streamlit-toggle-switch>=1.0.2',
35
+ 'click==8.1.7',
36
+ 'cloudpickle==3.0.0',
37
+ 'configspace==0.7.1',
38
+ 'cvxopt==1.3.2',
39
+ 'dask==2024.2.1',
40
+ 'dask-jobqueue==0.8.5',
41
+ 'deprecation==2.1.0',
42
+ 'distributed==2024.2.1',
43
+ 'emcee==3.1.4',
44
+ 'feeed == 1.2.0',
45
+ 'fsspec==2024.2.0',
46
+ 'imbalanced-learn==0.12.0',
47
+ 'imblearn==0.0',
48
+ 'importlib-metadata==7.0.1',
49
+ 'intervaltree==3.1.0',
50
+ 'jinja2==3.1.3',
51
+ 'levenshtein==0.23.0',
52
+ 'locket==1.0.0',
53
+ 'lxml==5.1.0',
54
+ 'markupsafe==2.1.5',
55
+ 'more-itertools==10.2.0',
56
+ 'msgpack==1.0.8',
57
+ 'networkx==3.2.1',
58
+ 'numpy==1.26.4',
59
+ 'pandas>=2.0.0',
60
+ 'partd==1.4.1',
61
+ 'pm4py==2.7.2',
62
+ 'psutil==5.9.8',
63
+ 'pydotplus==2.0.2',
64
+ 'pynisher==1.0.10',
65
+ 'pyrfr==0.9.0',
66
+ 'pyyaml==6.0.1',
67
+ 'rapidfuzz==3.6.1',
68
+ 'regex==2023.12.25',
69
+ 'scikit-learn==1.2.2',
70
+ 'scipy==1.10.1',
71
+ 'seaborn==0.13.2',
72
+ 'smac==2.0.2',
73
+ 'sortedcontainers==2.4.0',
74
+ 'stringdist==1.0.9',
75
+ 'tblib==3.0.0',
76
+ 'toolz==0.12.1',
77
+ 'tqdm==4.65.0',
78
+ 'typing-extensions==4.10.0',
79
+ 'urllib3==2.2.1',
80
+ 'zict==3.0.0'
81
  ],
82
  packages = ['gedi'],
83
  classifiers=[