import yaml


def load_yaml_configuration(yaml_path):
    """
    Loads the structure learning method from the yaml file configuration.

    :param yaml_path: the path of the yaml file
    :type yaml_path: str
    :return: the structure learning method
    :rtype: StructureLearningMethod
    """
    stream = open(yaml_path, 'r')
    learning_method = yaml.load(stream, Loader=yaml.FullLoader)
    stream.close()
    return learning_method