platform-demo-scripts/scripts/config_loader.py

27 lines
734 B
Python
Raw Normal View History

import json
from pathlib import Path
def load_config(file_path):
with open(file_path, 'r') as config_file:
config = json.load(config_file)
return config
project_path = str(Path.cwd().parent)
config_path = project_path + "/config.json"
config = load_config(config_path)
data_path = f"{project_path}/{config['data_path']}"
models_path = f"{project_path}/{config['models_path']}"
targets_path = f"{project_path}/{config['targets_path']}"
dataset_name = config['dataset_name']
configs_path = f"{project_path}/{config['configs_path']}"
sweep_files = config['sweep_files']
sampling_rate = config['sampling_rate']
num_workers = config['num_workers']
seed = config['seed']
experiment_count = config['experiment_count']