import yaml


def load_conf(conf_path):
  """Load a yaml encoded conf file."""
  try:
    with open(conf_path) as f:
      y = yaml.load(f, Loader=yaml.CLoader)
    return y or {}
  except Exception as e:
    raise ValueError('Invalid or nonexistent config filename')