Spaces:
Running
Running
Andrea Maldonado
commited on
Commit
·
1f8ed4f
1
Parent(s):
85c7f4a
Removes run parameters
Browse files- config.py +6 -2
- main.py +0 -1
- utils/default_argparse.py +0 -13
- utils/param_keys/__init__.py +0 -6
- utils/param_keys/run_options.py +0 -2
config.py
CHANGED
@@ -2,8 +2,9 @@ import json
|
|
2 |
import os
|
3 |
import warnings
|
4 |
|
|
|
|
|
5 |
from tqdm import tqdm
|
6 |
-
from utils.param_keys import INPUT_NAME, FILENAME, FOLDER_PATH, PARAMS
|
7 |
|
8 |
def get_model_params_list(alg_json_file: str) :#-> list[dict]:
|
9 |
"""
|
@@ -19,5 +20,8 @@ def get_model_params_list(alg_json_file: str) :#-> list[dict]:
|
|
19 |
warnings.warn('The default model parameter list is used instead of a .json-file.\n'
|
20 |
' Use a configuration from the `config_files`-folder together with the args `-a`.')
|
21 |
return [
|
22 |
-
{
|
|
|
|
|
|
|
23 |
]
|
|
|
2 |
import os
|
3 |
import warnings
|
4 |
|
5 |
+
from utils.param_keys import PIPELINE_STEP, INPUT_PATH, OUTPUT_PATH
|
6 |
+
from utils.param_keys.features import FEATURE_SET, FEATURE_PARAMS
|
7 |
from tqdm import tqdm
|
|
|
8 |
|
9 |
def get_model_params_list(alg_json_file: str) :#-> list[dict]:
|
10 |
"""
|
|
|
20 |
warnings.warn('The default model parameter list is used instead of a .json-file.\n'
|
21 |
' Use a configuration from the `config_files`-folder together with the args `-a`.')
|
22 |
return [
|
23 |
+
{PIPELINE_STEP: 'feature_extraction', INPUT_PATH: 'data/test',
|
24 |
+
FEATURE_PARAMS: {FEATURE_SET: ['ratio_unique_traces_per_trace',
|
25 |
+
'ratio_most_common_variant']},
|
26 |
+
OUTPUT_PATH: 'output/plots'}
|
27 |
]
|
main.py
CHANGED
@@ -8,7 +8,6 @@ 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 |
-
from utils.param_keys.run_options import *
|
12 |
|
13 |
def run(kwargs:dict, model_paramas_list: list, filename_list:list):
|
14 |
"""
|
|
|
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 |
"""
|
utils/default_argparse.py
CHANGED
@@ -6,23 +6,10 @@ class ArgParser(object):
|
|
6 |
def parse(description):
|
7 |
parser = argparse.ArgumentParser(description=description)
|
8 |
|
9 |
-
parser.add_argument(
|
10 |
-
'-o',
|
11 |
-
'--options',
|
12 |
-
dest='run_params_json',
|
13 |
-
help='a path to the parameter configuration of the program',
|
14 |
-
)
|
15 |
parser.add_argument(
|
16 |
'-a',
|
17 |
'--algorithm-configs',
|
18 |
dest='alg_params_json',
|
19 |
help='a path to the configurations of the algorithms'
|
20 |
)
|
21 |
-
parser.add_argument(
|
22 |
-
'-l',
|
23 |
-
'--load',
|
24 |
-
dest='result_load_files',
|
25 |
-
nargs='+',
|
26 |
-
help='the list of paths to already saved results'
|
27 |
-
)
|
28 |
return parser.parse_args()
|
|
|
6 |
def parse(description):
|
7 |
parser = argparse.ArgumentParser(description=description)
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
parser.add_argument(
|
10 |
'-a',
|
11 |
'--algorithm-configs',
|
12 |
dest='alg_params_json',
|
13 |
help='a path to the configurations of the algorithms'
|
14 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
return parser.parse_args()
|
utils/param_keys/__init__.py
CHANGED
@@ -1,9 +1,3 @@
|
|
1 |
-
# Run Params #
|
2 |
-
RUN_OPTION = 'run_option'
|
3 |
-
INPUT_NAME = 'input_name'
|
4 |
-
SAVE_RESULTS = 'save_results'
|
5 |
-
LOAD_RESULTS = 'load_results'
|
6 |
-
|
7 |
# Model params
|
8 |
ALGORITHM_NAME = 'algorithm_name'
|
9 |
PIPELINE_STEP = 'pipeline_step'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# Model params
|
2 |
ALGORITHM_NAME = 'algorithm_name'
|
3 |
PIPELINE_STEP = 'pipeline_step'
|
utils/param_keys/run_options.py
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
BASELINE = 'baseline'
|
2 |
-
COMPARE = 'compare'
|
|
|
|
|
|