Audio Dataset

This commit is contained in:
Si11ium
2020-12-01 16:37:15 +01:00
parent cfeea05673
commit c6fdaa24aa
7 changed files with 81 additions and 6 deletions

View File

@ -92,12 +92,21 @@ class Config(ConfigParser, ABC):
@property
def model_class(self):
try:
return locate_and_import_class(self.model.type)
return locate_and_import_class(self.model.type, folder_path='models')
except AttributeError as e:
raise AttributeError(f'The model alias you provided ("{self.get("model", "type")}") ' +
f'was not found!\n' +
f'{e}')
@property
def data_class(self):
try:
return locate_and_import_class(self.data.class_name, folder_path='datasets')
except AttributeError as e:
raise AttributeError(f'The dataset alias you provided ("{self.get("data", "class_name")}") ' +
f'was not found!\n' +
f'{e}')
# --------------------------------------------------
# TODO: Do this programmatically; This did not work:
# Initialize Default Sections as Property