Spaces:
Running
Running
File size: 1,115 Bytes
bdf9096 f137caa bdf9096 8c2c8d0 776721c 8c2c8d0 bdf9096 |
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 |
import json
import warnings
from gedi.utils.param_keys import PIPELINE_STEP, INPUT_PATH, OUTPUT_PATH
from gedi.utils.param_keys.features import FEATURE_SET, FEATURE_PARAMS
def get_model_params_list(alg_json_file: str) :#-> list[dict]:
"""
Loads the list of model configurations given from a json file or the default list of dictionary from the code.
@param alg_json_file: str
Path to the json data with the running configuration
@return: list[dict]
list of model configurations
"""
if alg_json_file is not None:
return json.load(open(alg_json_file))
else:
warnings.warn('The default model parameter list is used instead of a .json-file.\n'
' Use a configuration from the `config_files`-folder together with the args `-a`.')
return [
{PIPELINE_STEP: 'feature_extraction', INPUT_PATH: 'data/test',
FEATURE_PARAMS: {FEATURE_SET: ['ratio_variants_per_number_of_traces',
'ratio_most_common_variant']},
OUTPUT_PATH: 'output/plots'}
]
|