Andrea Maldonado commited on
Commit
1852a54
·
1 Parent(s): 9b73a6f

specifies numpy

Browse files
.github/workflows/test_gedi.yml CHANGED
@@ -29,7 +29,7 @@ jobs:
29
  python -m pip install --upgrade pip
30
  pip install .
31
 
32
- - name: Run feature_extraction test
33
  run:
34
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/feature_extraction.json
35
 
@@ -57,7 +57,7 @@ jobs:
57
  python -m pip install --upgrade pip
58
  pip install .
59
 
60
- - name: Run feature_extraction test
61
  run:
62
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/generation.json
63
 
@@ -85,9 +85,34 @@ jobs:
85
  python -m pip install --upgrade pip
86
  pip install .
87
 
88
- - name: Run feature_extraction test
89
  run:
90
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/benchmark.json
91
 
92
  - name: Compare output
93
  run: diff output/benchmark/test_2_benchmark.csv output/benchmark/test_2_benchmark.csv
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  python -m pip install --upgrade pip
30
  pip install .
31
 
32
+ - name: Run test
33
  run:
34
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/feature_extraction.json
35
 
 
57
  python -m pip install --upgrade pip
58
  pip install .
59
 
60
+ - name: Run test
61
  run:
62
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/generation.json
63
 
 
85
  python -m pip install --upgrade pip
86
  pip install .
87
 
88
+ - name: Run test
89
  run:
90
  python main.py -o config_files/options/baseline.json -a config_files/algorithm/benchmark.json
91
 
92
  - name: Compare output
93
  run: diff output/benchmark/test_2_benchmark.csv output/benchmark/test_2_benchmark.csv
94
+
95
+ test_augmentation:
96
+ runs-on: ubuntu-latest
97
+
98
+ # Setting up a python envronment for the test script to run
99
+ steps:
100
+ - name: Checkout code
101
+ uses: actions/checkout@v2
102
+
103
+ - name: Set up Python
104
+ uses: actions/setup-python@v2
105
+ with:
106
+ python-version: 3.x
107
+
108
+ - name: Install dependencies
109
+ run: |
110
+ sudo apt install python3-packaging
111
+ - name: Install feeed
112
+ run: |
113
+ python -m pip install --upgrade pip
114
+ pip install .
115
+
116
+ - name: Run test
117
+ run:
118
+ python main.py -o config_files/options/baseline.json -a config_files/algorithm/augmentation.json
config_files/algorithm/generation.json CHANGED
@@ -3,12 +3,7 @@
3
  "pipeline_step": "event_logs_generation",
4
  "output_path": "output",
5
  "generator_params": {
6
- "experiment": {
7
- "input_path": "data/grid_objectives.csv",
8
- "objectives": ["epa_normalized_variant_entropy"],
9
- "objectives": ["ratio_most_common_variant", "epa_normalized_sequence_entropy"],
10
- "objectives": ["ratio_top_20_variants","epa_normalized_sequence_entropy_linear_forgetting"]
11
- },
12
  "config_space": {
13
  "mode": [5, 20],
14
  "sequence": [0.01, 1],
@@ -21,7 +16,7 @@
21
  "duplicate": [0],
22
  "or": [0]
23
  },
24
- "n_trials": 50,
25
  "plot_reference_feature": "epa_normalized_sequence_entropy",
26
  "plot_reference_feature": "epa_normalized_sequence_entropy_linear_forgetting",
27
  "plot_reference_feature": ""
 
3
  "pipeline_step": "event_logs_generation",
4
  "output_path": "output",
5
  "generator_params": {
6
+ "experiment": {"epa_normalized_sequence_entropy_linear_forgetting": 0.4, "ratio_top_20_variants": 0.2},
 
 
 
 
 
7
  "config_space": {
8
  "mode": [5, 20],
9
  "sequence": [0.01, 1],
 
16
  "duplicate": [0],
17
  "or": [0]
18
  },
19
+ "n_trials": 5,
20
  "plot_reference_feature": "epa_normalized_sequence_entropy",
21
  "plot_reference_feature": "epa_normalized_sequence_entropy_linear_forgetting",
22
  "plot_reference_feature": ""
gedi/generator.py CHANGED
@@ -241,7 +241,6 @@ class GenerateEventLogs():
241
  configspace_tuples[k] = v[0]
242
  else:
243
  configspace_tuples[k] = tuple(v)
244
- print(configspace_tuples)
245
  configspace = ConfigurationSpace(configspace_tuples)
246
 
247
  if self.params.get(N_TRIALS) is None:
 
241
  configspace_tuples[k] = v[0]
242
  else:
243
  configspace_tuples[k] = tuple(v)
 
244
  configspace = ConfigurationSpace(configspace_tuples)
245
 
246
  if self.params.get(N_TRIALS) is None:
gedi/plotter.py CHANGED
@@ -618,7 +618,7 @@ class AugmentationPlotter(object):
618
  if output_path != None:
619
  output_path += f"/augmentation_pca_{n_features}_{self.sampler}.jpg"
620
  fig.savefig(output_path)
621
- print("SUCCESS: Saved augmentation pca plot at {output_path}")
622
 
623
 
624
  class GenerationPlotter(object):
@@ -673,7 +673,7 @@ class GenerationPlotter(object):
673
  targets = orig_targets.copy()
674
  elif isinstance(orig_targets, defaultdict):
675
  if k not in orig_targets:
676
- print("[WARNING] {k} not in targets. Only in generated features. Will continue with next feature to compare with")
677
  continue
678
  targets = orig_targets[k].copy()
679
  else:
 
618
  if output_path != None:
619
  output_path += f"/augmentation_pca_{n_features}_{self.sampler}.jpg"
620
  fig.savefig(output_path)
621
+ print(f"SUCCESS: Saved augmentation pca plot at {output_path}")
622
 
623
 
624
  class GenerationPlotter(object):
 
673
  targets = orig_targets.copy()
674
  elif isinstance(orig_targets, defaultdict):
675
  if k not in orig_targets:
676
+ print(f"[WARNING] {k} not in targets. Only in generated features. Will continue with next feature to compare with")
677
  continue
678
  targets = orig_targets[k].copy()
679
  else:
setup.py CHANGED
@@ -24,7 +24,7 @@ setup(
24
  'imblearn==0.0',
25
  'Levenshtein==0.23.0',
26
  'matplotlib==3.8.4',
27
- 'numpy>=1.23.1',
28
  'pandas==2.2.2',
29
  'pm4py==2.7.2',
30
  'scikit-learn==1.2.2',
 
24
  'imblearn==0.0',
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',