def locate_ac_config(model_dir):
    """Search through the model_dir branch for a file named
       accuracy_checker.yml"""

    while True:
        path = model_dir / 'accuracy_checker.yml'
        if path.is_file():
            return path
        if model_dir.parent == model_dir:
            return None
        model_dir = model_dir.parent