def retrieve_error_metric(name): module = load_module_with_error_messages('error metric', predefined_error_metric_path, name) metric = load_callable_with_error_messages(module, 'error_metric', name, module_type='error metric') return name, metric
def load_and_validate_dataset_module(name): # loading a dataset validates the metadata module, metadata = load_module_with_error_messages( 'dataset', predefined_dataset_path, name, metadata_schema=dataset_metadata_schema()) generate_dataset = load_callable_with_error_messages( module, 'generate_dataset', name, module_type='dataset', generatorfunc=True) return generate_dataset, metadata
def load_and_validate_trainable_method_module(name): module, metadata = load_module_with_error_messages( 'trainable method', predefined_trainable_method_path, name, metadata_schema=method_metadata_schema()) train = load_callable_with_error_messages(module, 'train', name, module_type='trainable method') return train, metadata
def load_and_validate_dataset_module(name): # loading a dataset validates the metadata module, metadata = load_module_with_error_messages( 'dataset', predefined_dataset_path, name, metadata_schema=dataset_metadata_schema()) generate_dataset = load_callable_with_error_messages(module, 'generate_dataset', name, module_type='dataset', generatorfunc=True) return generate_dataset, metadata
def retrieve_lm_process(name): module = load_module_with_error_messages('landmark process', predefined_lmprocess_path, name) process = load_callable_with_error_messages(module, 'process', name, module_type='landmark process') return LandmarkProcess(name, process)