import yaml from fb_detr.locations import CONFIG_FILE def read_config(key, config_path: str = CONFIG_FILE): """Reads the values associated with a key from a config. Args: key: Key to look up the value to. config_path: Path to config. Returns: The value associated with `key`. """ with open(config_path) as f: config = yaml.load(f, Loader=yaml.FullLoader) return config[key]