from pathlib import Path
import yaml


def load_config(filepath):
    """ Load experiment configuration from a file path.

    Args:
        filepath: str, configuration file path

    Returns:
        dict, experiment configuration.
    """
    config_path = Path(filepath)
    with config_path.open('r') as f:
        config = yaml.safe_load(f)
    return config