Skip to content
Snippets Groups Projects
Configuration.py 502 B
import os
from configparser import ConfigParser

# Read configuration file
path_current_directory = os.path.dirname(__file__)
path_config_file = os.path.join(path_current_directory, 'config.ini')
config = ConfigParser()
config.read(path_config_file)

# region Get section

version = config["VERSION"]
datasetConfig = config["DATASET_PARAMS"]
modelEncoderConfig = config["MODEL_ENCODER"]
modelLinkerConfig = config["MODEL_LINKER"]
modelTrainingConfig = config["MODEL_TRAINING"]

# endregion Get section