예제 #1
0
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
예제 #2
0
파일: base.py 프로젝트: nontas/menpobench
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
예제 #3
0
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
예제 #4
0
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
예제 #5
0
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
예제 #6
0
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)